From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id 975653858D1E for ; Thu, 19 Oct 2023 18:29:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 975653858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 975653858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::432 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697740185; cv=none; b=N/8BPxwUFUQzmNxICTPmEkswJ+y2Fp2EVq+PfaDwcQynisRD7pLRl+Y+RB/Ha5/4v5uM15qTh4q1NDqip9gx5kStkKxY0YophdLYvhVPBdv0Yz2KVKS8ZPvExP46WgePUn/HPlHauFL9ObfrOIfdZQ1qTSrEGneDOU46Fyu3sH0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697740185; c=relaxed/simple; bh=e/YsRlxu/1F0AlHFYGNLTGm7ZBIEvuNDjnE2HK6NoXA=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=ipDI6/RvIdvndoHkJCeNg1gOBNH8RRp2j7g9A9CHerOEIuPF4yzHNSLy+pj9uZN1aZxn6gwKldb44oi4BbrNTnr8s2Eek1vvGgSYcAmtGd2IMfI4jdRg+j8Hhy9Sb0YAU2ohSU0DJRj278D1w7Oz8aWQAh1JX+24kfAMnBeH+Y4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-6934202b8bdso33261b3a.1 for ; Thu, 19 Oct 2023 11:29:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697740182; x=1698344982; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=0qEnsGeLogdAD2E0cKs9qo0abnG9o4QXj6mjsYVCkdY=; b=klvEROfKoXCx/DbTDkmwvigfGeKksqVMmnzChXiLnoCc6msfaNl9Gvz+J6gPNzxBRr U77pF4auVQmHEzTFbiCxhsxnkoJciePu9s4kOOtmHkK1+P7FK4ukEAn88YzV5/yNYsXa n5jB+VsADN1NBTg9wVMoowVYbJ8B1d4KNFJT9ThBgiNScxNdHy3ZcYl+bjERSbzOQXb3 mTvGZFVYtmQp0U/ROiHISJrZXAp+j6p+244unXGbNCAbL6Jo7yXFDfal7Bjm3YG6rCT6 OfKDrXRueoE8JkvN0ZO9CM41hVTkKrc1ayryX9epiujD1Q67o2X0jUahLRiRzL2uOxmP mk8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697740182; x=1698344982; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0qEnsGeLogdAD2E0cKs9qo0abnG9o4QXj6mjsYVCkdY=; b=KSg7HdIH6oXFYRx23pRhYm1zXrMfmQyRjMKe0qcIDZGeQ0U3ktSKjB3wMsKaPJEeex J/uDSE5WqQKJNbHmyw4bHGFToNXPU616N7vFCq9g1PcOI2+WZPMj7pZrDqGJkEqgivsq sOjldn6swtAensrvS8V2EiQaqQLcMm1jWoj0h9abhz3t6Of694d2AgknB7NbmDdMCiQG Yp5pzOlGsEtzJ7n4IChVYaV8cZ6Df6QJnJPa2if401E7G1abGDl2X8XWThBIoDwVu5oK bcPGfKuhViz0ZswHck2QprtX5Pw31YixJqVkCs416ACEdbqv3tD4BVDpFMZXvmE8SDCs ONVA== X-Gm-Message-State: AOJu0YyDEESvUTMD0dymv9yPEQgbVYMoQ7X1OYwi+foIk9zRTwKOCzXm uhc1GahvTPJS3bsGJNMDOHcJ4w== X-Google-Smtp-Source: AGHT+IHq6SwUdZ7BI39RIGZOQJ9NpwLnJHiLkYunir+mfV7/qvWpcW4xAVq4Ovn2VKKGPxSzoTdmcg== X-Received: by 2002:aa7:88c6:0:b0:6bd:a8a3:cc59 with SMTP id k6-20020aa788c6000000b006bda8a3cc59mr3218707pff.24.1697740182454; Thu, 19 Oct 2023 11:29:42 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c3:a647:51c8:7d15:99b:dc36? ([2804:1b3:a7c3:a647:51c8:7d15:99b:dc36]) by smtp.gmail.com with ESMTPSA id x25-20020aa79ad9000000b006926a2c9eb7sm102052pfp.119.2023.10.19.11.29.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Oct 2023 11:29:41 -0700 (PDT) Message-ID: <5e8e6f28-fca0-444f-81de-1944d0636100@linaro.org> Date: Thu, 19 Oct 2023 15:29:38 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 05/16] Remove 'pwd' and merge into 'nss' Content-Language: en-US To: Arjun Shankar , libc-alpha@sourceware.org References: <20231002130150.1497733-1-arjun@redhat.com> <20231002130150.1497733-6-arjun@redhat.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <20231002130150.1497733-6-arjun@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 List-Id: On 02/10/23 09:55, Arjun Shankar wrote: > The majority of pwd routines are entry points for nss functionality. > This commit removes the 'pwd' subdirectory and moves all functionality > and tests to 'nss'. References to pwd/ are accordingly changed. LGTM, thanks. Reviewed-by: Adhemerval Zanella > --- > Makeconfig | 2 +- > include/pwd.h | 2 +- > nss/Makefile | 24 +++++++++++++++++++++ > nss/Versions | 8 +++++++ > {pwd => nss}/fgetpwent.c | 0 > {pwd => nss}/fgetpwent_r.c | 0 > {pwd => nss}/getpw.c | 0 > {pwd => nss}/getpwent.c | 0 > {pwd => nss}/getpwent_r.c | 0 > {pwd => nss}/getpwnam.c | 0 > {pwd => nss}/getpwnam_r.c | 0 > {pwd => nss}/getpwuid.c | 0 > {pwd => nss}/getpwuid_r.c | 0 > {pwd => nss}/putpwent.c | 0 > {pwd => nss}/pwd.h | 0 > {pwd => nss}/tst-getpw.c | 0 > {pwd => nss}/tst-putpwent.c | 0 > pwd/Makefile | 42 ------------------------------------- > pwd/Versions | 19 ----------------- > 19 files changed, 34 insertions(+), 63 deletions(-) > rename {pwd => nss}/fgetpwent.c (100%) > rename {pwd => nss}/fgetpwent_r.c (100%) > rename {pwd => nss}/getpw.c (100%) > rename {pwd => nss}/getpwent.c (100%) > rename {pwd => nss}/getpwent_r.c (100%) > rename {pwd => nss}/getpwnam.c (100%) > rename {pwd => nss}/getpwnam_r.c (100%) > rename {pwd => nss}/getpwuid.c (100%) > rename {pwd => nss}/getpwuid_r.c (100%) > rename {pwd => nss}/putpwent.c (100%) > rename {pwd => nss}/pwd.h (100%) > rename {pwd => nss}/tst-getpw.c (100%) > rename {pwd => nss}/tst-putpwent.c (100%) > delete mode 100644 pwd/Makefile > delete mode 100644 pwd/Versions > > diff --git a/Makeconfig b/Makeconfig > index ac7fa3dbb3..e5badddbc4 100644 > --- a/Makeconfig > +++ b/Makeconfig > @@ -1352,7 +1352,7 @@ endif > # dependencies and generate sorted-subdirs dynamically. > all-subdirs = csu assert ctype locale intl catgets math setjmp signal \ > stdlib stdio-common libio malloc string wcsmbs time dirent \ > - pwd posix io termios resource misc socket sysvipc gmon \ > + posix io termios resource misc socket sysvipc gmon \ > gnulib iconv iconvdata wctype manual shadow po argp \ > localedata timezone rt conform debug mathvec support \ > dlfcn elf > diff --git a/include/pwd.h b/include/pwd.h > index f8975d4957..c4ca8bab33 100644 > --- a/include/pwd.h > +++ b/include/pwd.h > @@ -1,5 +1,5 @@ > #ifndef _PWD_H > -#include > +#include > > #ifndef _ISOMAC > /* Now define the internal interfaces. */ > diff --git a/nss/Makefile b/nss/Makefile > index 5256b90f8b..28648ea884 100644 > --- a/nss/Makefile > +++ b/nss/Makefile > @@ -26,6 +26,7 @@ headers := \ > grp.h \ > gshadow.h \ > nss.h \ > + pwd.h \ > # headers > > # This is the trivial part which goes into libc itself. > @@ -103,6 +104,27 @@ CFLAGS-getsgnam.c += -fexceptions > CFLAGS-getsgnam_r.c += -fexceptions > endif > > +# pwd routines: > +routines += \ > + fgetpwent \ > + fgetpwent_r \ > + getpw \ > + getpwent \ > + getpwent_r \ > + getpwnam \ > + getpwnam_r \ > + getpwuid \ > + getpwuid_r \ > + putpwent \ > + # routines > + > +ifeq ($(have-thread-library),yes) > +CFLAGS-fgetpwent_r.c += $(libio-mtsafe) > +CFLAGS-getpw.c += -fexceptions > +CFLAGS-getpwent.c += -fexceptions > +CFLAGS-getpwent_r.c += -fexceptions > +endif > + > # These are the databases that go through nss dispatch. > # Caution: if you add a database here, you must add its real name > # in databases.def, too. > @@ -143,6 +165,7 @@ tests := \ > test-netdb \ > testgrp \ > tst-fgetsgent_r \ > + tst-getpw \ > tst-gshadow \ > tst-nss-getpwent \ > tst-nss-hash \ > @@ -152,6 +175,7 @@ tests := \ > tst-nss-test5 \ > tst-nss-test_errno \ > tst-putgrent \ > + tst-putpwent \ > tst-putsgent \ > tst-sgetsgent \ > # tests > diff --git a/nss/Versions b/nss/Versions > index 6204ac0af1..58ca73c9df 100644 > --- a/nss/Versions > +++ b/nss/Versions > @@ -8,19 +8,26 @@ libc { > > # e* > endgrent; > + endpwent; > > # f* > fgetgrent; fgetgrent_r; > + fgetpwent; fgetpwent_r; > > # g* > getgrent; getgrent_r; getgrgid; getgrgid_r; getgrnam; getgrnam_r; > getgroups; > + getpw; getpwent; getpwent_r; getpwnam; getpwnam_r; getpwuid; getpwuid_r; > > # i* > initgroups; > > + # p* > + putpwent; > + > # s* > setgrent; > + setpwent; > } > GLIBC_2.1 { > # p* > @@ -29,6 +36,7 @@ libc { > GLIBC_2.1.2 { > # g* > getgrent_r; getgrgid_r; getgrnam_r; > + getpwent_r; getpwuid_r; getpwnam_r; > } > GLIBC_2.2.2 { > __nss_hostname_digits_dots; > diff --git a/pwd/fgetpwent.c b/nss/fgetpwent.c > similarity index 100% > rename from pwd/fgetpwent.c > rename to nss/fgetpwent.c > diff --git a/pwd/fgetpwent_r.c b/nss/fgetpwent_r.c > similarity index 100% > rename from pwd/fgetpwent_r.c > rename to nss/fgetpwent_r.c > diff --git a/pwd/getpw.c b/nss/getpw.c > similarity index 100% > rename from pwd/getpw.c > rename to nss/getpw.c > diff --git a/pwd/getpwent.c b/nss/getpwent.c > similarity index 100% > rename from pwd/getpwent.c > rename to nss/getpwent.c > diff --git a/pwd/getpwent_r.c b/nss/getpwent_r.c > similarity index 100% > rename from pwd/getpwent_r.c > rename to nss/getpwent_r.c > diff --git a/pwd/getpwnam.c b/nss/getpwnam.c > similarity index 100% > rename from pwd/getpwnam.c > rename to nss/getpwnam.c > diff --git a/pwd/getpwnam_r.c b/nss/getpwnam_r.c > similarity index 100% > rename from pwd/getpwnam_r.c > rename to nss/getpwnam_r.c > diff --git a/pwd/getpwuid.c b/nss/getpwuid.c > similarity index 100% > rename from pwd/getpwuid.c > rename to nss/getpwuid.c > diff --git a/pwd/getpwuid_r.c b/nss/getpwuid_r.c > similarity index 100% > rename from pwd/getpwuid_r.c > rename to nss/getpwuid_r.c > diff --git a/pwd/putpwent.c b/nss/putpwent.c > similarity index 100% > rename from pwd/putpwent.c > rename to nss/putpwent.c > diff --git a/pwd/pwd.h b/nss/pwd.h > similarity index 100% > rename from pwd/pwd.h > rename to nss/pwd.h > diff --git a/pwd/tst-getpw.c b/nss/tst-getpw.c > similarity index 100% > rename from pwd/tst-getpw.c > rename to nss/tst-getpw.c > diff --git a/pwd/tst-putpwent.c b/nss/tst-putpwent.c > similarity index 100% > rename from pwd/tst-putpwent.c > rename to nss/tst-putpwent.c > diff --git a/pwd/Makefile b/pwd/Makefile > deleted file mode 100644 > index d85842af3e..0000000000 > --- a/pwd/Makefile > +++ /dev/null > @@ -1,42 +0,0 @@ > -# Copyright (C) 1991-2023 Free Software Foundation, Inc. > -# This file is part of the GNU C Library. > - > -# The GNU C Library is free software; you can redistribute it and/or > -# modify it under the terms of the GNU Lesser General Public > -# License as published by the Free Software Foundation; either > -# version 2.1 of the License, or (at your option) any later version. > - > -# The GNU C Library is distributed in the hope that it will be useful, > -# but WITHOUT ANY WARRANTY; without even the implied warranty of > -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > -# Lesser General Public License for more details. > - > -# You should have received a copy of the GNU Lesser General Public > -# License along with the GNU C Library; if not, see > -# . > - > -# > -# Sub-makefile for pwd portion of the library. > -# > -subdir := pwd > - > -include ../Makeconfig > - > -headers := pwd.h > - > -routines := fgetpwent getpw putpwent \ > - getpwent getpwnam getpwuid \ > - getpwent_r getpwnam_r getpwuid_r fgetpwent_r > - > -tests := tst-getpw tst-putpwent > - > -include ../Rules > - > -ifeq ($(have-thread-library),yes) > - > -CFLAGS-getpwent_r.c += -fexceptions > -CFLAGS-getpwent.c += -fexceptions > -CFLAGS-getpw.c += -fexceptions > -CFLAGS-fgetpwent_r.c += $(libio-mtsafe) > - > -endif > diff --git a/pwd/Versions b/pwd/Versions > deleted file mode 100644 > index b56970019a..0000000000 > --- a/pwd/Versions > +++ /dev/null > @@ -1,19 +0,0 @@ > -libc { > - GLIBC_2.0 { > - # e* > - endpwent; > - > - # f* > - fgetpwent; fgetpwent_r; > - > - # g* > - getpw; getpwent; getpwent_r; getpwnam; getpwnam_r; getpwuid; getpwuid_r; > - > - # p* > - putpwent; setpwent; > - } > - GLIBC_2.1.2 { > - # g* > - getpwent_r; getpwuid_r; getpwnam_r; > - } > -}