From patchwork Mon Oct 2 12:55:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arjun Shankar X-Patchwork-Id: 76970 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 AF835394847B for ; Mon, 2 Oct 2023 13:03:48 +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 7F2013861876 for ; Mon, 2 Oct 2023 13:02:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7F2013861876 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=1696251740; 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=HCSGBvgBP/HeJgwvtSBxFE8xAmWNjR/Ru9N9v9JIFT8=; b=Zuyio9kcMii50EmbwdpAZ3Bt0rHWI/5MNnWHADZX+EzchcKt8ULyLJkvv5HHKB7vZ7Ifyz TX9xu9KBy/51PL4E1SHNszGvKL/szZQJZddJq0AG35HI0locLpQqhc8KJQP5lcfUorGURQ OBxE9bVCfki1RiLJlDoJ2gcay5pQz48= 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-635-bMzoEfuUMXGc1U2oeE_r3g-1; Mon, 02 Oct 2023 09:02:17 -0400 X-MC-Unique: bMzoEfuUMXGc1U2oeE_r3g-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 F22BE3C176EF for ; Mon, 2 Oct 2023 13:02:16 +0000 (UTC) Received: from localhost.localdomain (dhcp129-93.brq.redhat.com [10.34.129.93]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 78EEFC154CA; Mon, 2 Oct 2023 13:02:16 +0000 (UTC) From: Arjun Shankar To: libc-alpha@sourceware.org, Arjun Shankar Subject: [PATCH 13/16] Move 'rpc' routines from 'inet' into 'nss' Date: Mon, 2 Oct 2023 14:55:25 +0200 Message-ID: <20231002130150.1497733-14-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 getrpcby* and getrpcent* routines are entry points for nss functionality. This commit moves them from the 'inet' subdirectory to 'nss'. The Versions entries for these routines along with a test, located in the 'sunrpc' subdirectory, are also moved into 'nss'. Reviewed-by: Adhemerval Zanella --- inet/Makefile | 8 -------- nss/Makefile | 16 ++++++++++++++++ nss/Versions | 2 ++ {inet => nss}/getrpcbyname.c | 0 {inet => nss}/getrpcbyname_r.c | 0 {inet => nss}/getrpcbynumber.c | 0 {inet => nss}/getrpcbynumber_r.c | 0 {inet => nss}/getrpcent.c | 0 {inet => nss}/getrpcent_r.c | 0 {sunrpc => nss}/test-rpcent.c | 0 sunrpc/Makefile | 2 +- sunrpc/Versions | 3 +-- 12 files changed, 20 insertions(+), 11 deletions(-) rename {inet => nss}/getrpcbyname.c (100%) rename {inet => nss}/getrpcbyname_r.c (100%) rename {inet => nss}/getrpcbynumber.c (100%) rename {inet => nss}/getrpcbynumber_r.c (100%) rename {inet => nss}/getrpcent.c (100%) rename {inet => nss}/getrpcent_r.c (100%) rename {sunrpc => nss}/test-rpcent.c (100%) diff --git a/inet/Makefile b/inet/Makefile index dab7182a11..3c1987877a 100644 --- a/inet/Makefile +++ b/inet/Makefile @@ -48,12 +48,6 @@ routines := \ ether_ntoa_r \ getipv4sourcefilter \ getnameinfo \ - getrpcbyname \ - getrpcbyname_r \ - getrpcbynumber \ - getrpcbynumber_r \ - getrpcent \ - getrpcent_r \ getservent \ getservent_r \ getsourcefilter \ @@ -132,8 +126,6 @@ include ../gen-locales.mk ifeq ($(have-thread-library),yes) CFLAGS-rcmd.c += -fexceptions -CFLAGS-getrpcent_r.c += -fexceptions -CFLAGS-getrpcent.c += -fexceptions CFLAGS-getservent_r.c += -fexceptions CFLAGS-getservent.c += -fexceptions CFLAGS-either_ntoh.c += -fexceptions diff --git a/nss/Makefile b/nss/Makefile index df22d3655c..cbfd5dc692 100644 --- a/nss/Makefile +++ b/nss/Makefile @@ -214,6 +214,21 @@ CFLAGS-getpwent.c += -fexceptions CFLAGS-getpwent_r.c += -fexceptions endif +# rpc routines: +routines += \ + getrpcbyname \ + getrpcbyname_r \ + getrpcbynumber \ + getrpcbynumber_r \ + getrpcent \ + getrpcent_r \ + # routines + +ifeq ($(have-thread-library),yes) +CFLAGS-getrpcent_r.c += -fexceptions +CFLAGS-getrpcent.c += -fexceptions +endif + # shadow routines routines += \ fgetspent \ @@ -276,6 +291,7 @@ tests := \ bug17079 \ test-digits-dots \ test-netdb \ + test-rpcent \ testgrp \ tst-fgetsgent_r \ tst-gethnm \ diff --git a/nss/Versions b/nss/Versions index c5de97fb53..b7491154bf 100644 --- a/nss/Versions +++ b/nss/Versions @@ -30,6 +30,8 @@ libc { getprotobyname; getprotobyname_r; getprotobynumber; getprotobynumber_r; getprotoent; getprotoent_r; getpw; getpwent; getpwent_r; getpwnam; getpwnam_r; getpwuid; getpwuid_r; + getrpcbyname; getrpcbyname_r; getrpcbynumber; getrpcbynumber_r; + getrpcent; getrpcent_r; getspent; getspent_r; getspnam; getspnam_r; # i* diff --git a/inet/getrpcbyname.c b/nss/getrpcbyname.c similarity index 100% rename from inet/getrpcbyname.c rename to nss/getrpcbyname.c diff --git a/inet/getrpcbyname_r.c b/nss/getrpcbyname_r.c similarity index 100% rename from inet/getrpcbyname_r.c rename to nss/getrpcbyname_r.c diff --git a/inet/getrpcbynumber.c b/nss/getrpcbynumber.c similarity index 100% rename from inet/getrpcbynumber.c rename to nss/getrpcbynumber.c diff --git a/inet/getrpcbynumber_r.c b/nss/getrpcbynumber_r.c similarity index 100% rename from inet/getrpcbynumber_r.c rename to nss/getrpcbynumber_r.c diff --git a/inet/getrpcent.c b/nss/getrpcent.c similarity index 100% rename from inet/getrpcent.c rename to nss/getrpcent.c diff --git a/inet/getrpcent_r.c b/nss/getrpcent_r.c similarity index 100% rename from inet/getrpcent_r.c rename to nss/getrpcent_r.c diff --git a/sunrpc/test-rpcent.c b/nss/test-rpcent.c similarity index 100% rename from sunrpc/test-rpcent.c rename to nss/test-rpcent.c diff --git a/sunrpc/Makefile b/sunrpc/Makefile index ec2ea04ca9..83a0f2d099 100644 --- a/sunrpc/Makefile +++ b/sunrpc/Makefile @@ -64,7 +64,7 @@ routines := auth_none authuxprot clnt_raw clnt_simp \ shared-only-routines = $(routines) endif -tests = tst-xdrmem tst-xdrmem2 test-rpcent tst-udp-error tst-udp-timeout \ +tests = tst-xdrmem tst-xdrmem2 tst-udp-error tst-udp-timeout \ tst-udp-nonblocking tst-bug22542 tst-bug28768 xtests := tst-getmyaddr diff --git a/sunrpc/Versions b/sunrpc/Versions index 77bc6a4c9b..cba6e36422 100644 --- a/sunrpc/Versions +++ b/sunrpc/Versions @@ -26,8 +26,7 @@ libc { # g* get_myaddress; getpublickey; getsecretkey; - getrpcbyname; getrpcbyname_r; getrpcbynumber; getrpcbynumber_r; - getrpcent; getrpcent_r; getrpcport; + getrpcport; # p* pmap_getmaps; pmap_getport; pmap_rmtcall; pmap_set; pmap_unset;