From patchwork Mon Oct 2 12:55:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arjun Shankar X-Patchwork-Id: 76960 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5A4373861866 for ; Mon, 2 Oct 2023 13:02:55 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 21C02385CCBE for ; Mon, 2 Oct 2023 13:02:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 21C02385CCBE Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696251731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ouerx0ZYnLGblOsOZhuFLyIqO3oIsIOPfmhgGm9NehQ=; b=O3lIdj/4b2oopNvrhxSmLtZIv+dVu0AFNqOiLETz7MvxKBO4DfOiB6wv7u+UVJp3XFkJ/S MhadyP7wxqyTNZj7OqWlVACk1FvvAUQ6sJJlAJA/O156KJqpLtkmNvQqo6LZuUmq6moBJ5 gO/LtCay7h6ZjMhW7Np7pWZxUKuIwG4= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-617-cYNH_njfOB-yF_g5uUV8VQ-1; Mon, 02 Oct 2023 09:02:10 -0400 X-MC-Unique: cYNH_njfOB-yF_g5uUV8VQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E782D3816C9C for ; Mon, 2 Oct 2023 13:02:09 +0000 (UTC) Received: from localhost.localdomain (dhcp129-93.brq.redhat.com [10.34.129.93]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6CF14C15BB8; Mon, 2 Oct 2023 13:02:09 +0000 (UTC) From: Arjun Shankar To: libc-alpha@sourceware.org, Arjun Shankar Subject: [PATCH 07/16] Move 'aliases' routines from 'inet' into 'nss' Date: Mon, 2 Oct 2023 14:55:19 +0200 Message-ID: <20231002130150.1497733-8-arjun@redhat.com> In-Reply-To: <20231002130150.1497733-1-arjun@redhat.com> References: <20231002130150.1497733-1-arjun@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_SBL_CSS, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org The aliases routines are entry points for nss functionality. This commit moves aliases.h and the aliases routines from the 'inet' subdirectory to 'nss', and adjusts any external references. Reviewed-by: Adhemerval Zanella --- include/aliases.h | 2 +- inet/Makefile | 7 ------- inet/Versions | 1 - nss/Makefile | 14 ++++++++++++++ nss/Versions | 1 + {inet => nss}/aliases.h | 0 {inet => nss}/getaliasent.c | 0 {inet => nss}/getaliasent_r.c | 0 {inet => nss}/getaliasname.c | 0 {inet => nss}/getaliasname_r.c | 0 10 files changed, 16 insertions(+), 9 deletions(-) rename {inet => nss}/aliases.h (100%) rename {inet => nss}/getaliasent.c (100%) rename {inet => nss}/getaliasent_r.c (100%) rename {inet => nss}/getaliasname.c (100%) rename {inet => nss}/getaliasname_r.c (100%) diff --git a/include/aliases.h b/include/aliases.h index db82588630..2c7756efe8 100644 --- a/include/aliases.h +++ b/include/aliases.h @@ -1,5 +1,5 @@ #ifndef _ALIASES_H -#include +#include # ifndef _ISOMAC diff --git a/inet/Makefile b/inet/Makefile index 9db7f941c6..bd3dc58322 100644 --- a/inet/Makefile +++ b/inet/Makefile @@ -24,7 +24,6 @@ include ../Makeconfig headers := \ $(wildcard arpa/*.h protocols/*.h) \ - aliases.h \ bits/in.h \ ifaddrs.h \ netinet/ether.h \ @@ -49,10 +48,6 @@ routines := \ ether_ntoa \ ether_ntoa_r \ ether_ntoh \ - getaliasent \ - getaliasent_r \ - getaliasname \ - getaliasname_r \ gethstbyad \ gethstbyad_r \ gethstbynm \ @@ -176,8 +171,6 @@ CFLAGS-getnetbyad_r.c += -fexceptions CFLAGS-getnetbyad.c += -fexceptions CFLAGS-getnetent_r.c += -fexceptions CFLAGS-getnetent.c += -fexceptions -CFLAGS-getaliasent_r.c += -fexceptions -CFLAGS-getaliasent.c += -fexceptions CFLAGS-getrpcent_r.c += -fexceptions CFLAGS-getrpcent.c += -fexceptions CFLAGS-getservent_r.c += -fexceptions diff --git a/inet/Versions b/inet/Versions index 84cbe847cd..e6d1e6f1ba 100644 --- a/inet/Versions +++ b/inet/Versions @@ -14,7 +14,6 @@ libc { ether_ntoa_r; ether_ntohost; # g* - getaliasbyname; getaliasbyname_r; getaliasent; getaliasent_r; getdomainname; gethostbyaddr; gethostbyaddr_r; gethostbyname; gethostbyname2; gethostbyname2_r; gethostbyname_r; gethostent; gethostent_r; getnetbyaddr; getnetbyaddr_r; getnetbyname; diff --git a/nss/Makefile b/nss/Makefile index 84cf62af2b..2dfa7ebef9 100644 --- a/nss/Makefile +++ b/nss/Makefile @@ -23,6 +23,7 @@ subdir := nss include ../Makeconfig headers := \ + aliases.h \ grp.h \ gshadow.h \ nss.h \ @@ -54,6 +55,19 @@ routines = \ valid_list_field \ # routines +# alias routines: +routines += \ + getaliasent \ + getaliasent_r \ + getaliasname \ + getaliasname_r \ + # routines + +ifeq ($(have-thread-library),yes) +CFLAGS-getaliasent_r.c += -fexceptions +CFLAGS-getaliasent.c += -fexceptions +endif + # grp routines: routines += \ fgetgrent \ diff --git a/nss/Versions b/nss/Versions index 632af25be4..5d1b1dac3d 100644 --- a/nss/Versions +++ b/nss/Versions @@ -17,6 +17,7 @@ libc { fgetspent; fgetspent_r; # g* + getaliasbyname; getaliasbyname_r; getaliasent; getaliasent_r; getgrent; getgrent_r; getgrgid; getgrgid_r; getgrnam; getgrnam_r; getgroups; getpw; getpwent; getpwent_r; getpwnam; getpwnam_r; getpwuid; getpwuid_r; diff --git a/inet/aliases.h b/nss/aliases.h similarity index 100% rename from inet/aliases.h rename to nss/aliases.h diff --git a/inet/getaliasent.c b/nss/getaliasent.c similarity index 100% rename from inet/getaliasent.c rename to nss/getaliasent.c diff --git a/inet/getaliasent_r.c b/nss/getaliasent_r.c similarity index 100% rename from inet/getaliasent_r.c rename to nss/getaliasent_r.c diff --git a/inet/getaliasname.c b/nss/getaliasname.c similarity index 100% rename from inet/getaliasname.c rename to nss/getaliasname.c diff --git a/inet/getaliasname_r.c b/nss/getaliasname_r.c similarity index 100% rename from inet/getaliasname_r.c rename to nss/getaliasname_r.c