From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id CA0103858D28 for ; Thu, 19 Oct 2023 18:44:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CA0103858D28 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 CA0103858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::32d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697741092; cv=none; b=lYIlDQTe6qEzLX6crVtsGrOuULPPdgO08L0JkvYDmEmkO+j1zCO2v6y6XaSBTyGFe6fSaOT3SmlNiZmAu+MwqiocPzygfaP49VnIY89DkHvfm/qnPtfwVhFYVqub5YD8n/EpL7Y3OQRQ7J/PcTRcgB0QDhlCe5HUeI9MDFp2xr4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697741092; c=relaxed/simple; bh=msfvxAZFF3yHImgDHM6nKJR3CsKq7HFM4pP4U77iV0c=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=Y5DJSjv6nrK/0t1uLcExnBHuzl5LWDUcRawYMg476yo/gtJcubZsOBFkV0J2Rb1FTWyhkRKvn5poe0URdxRwM+alQhYpBWiTMCtG7W8Zw08tqFgMdH3PW0rFLiBUhet/mwWY8QBsl0wX5/pQJnS/okvvYSyr9PDSAv99qXqUphw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ot1-x32d.google.com with SMTP id 46e09a7af769-6ce2ea3a944so20095a34.1 for ; Thu, 19 Oct 2023 11:44:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697741089; x=1698345889; 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=+onHjcUvya7MAj+lD8fUEgQg3WJUq3i56Sa9j+S7Pr8=; b=A2cJ0pvyqAwUAxpcbRzhUmt5XnbSgN6sxUCYEovYl45uLMpSF3PZasOkYIe3okW8SV NNjRVIYaHTCHcIiIG5vwpa4YnMuh88i7QQbE/aWHeXkW+YdyppDZaO5E+5YnwlvC4CQk 7QziNHNh4U5MwdIuBJ6NKiQTIOkXbV+TVDBHOuGgZhhQBAtMYMfjQDSe5PE7TjgLal+K oGGyl6o/lGd+2v4u3fLcleKuXHrCwhWeLbjS5MJFRQ0elePxzCr9Wu/F3HPoIKchx5mT 2CLSJKIYXrLUVwFeBd/9LYD01ogBY77SFqXmv1dQtMdTscAg7HPuOCtiIXwJhVeGfR04 UAoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697741089; x=1698345889; 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=+onHjcUvya7MAj+lD8fUEgQg3WJUq3i56Sa9j+S7Pr8=; b=OKesZMP0O8pePW8fpo8C0MPlIiTvReovBymwlk+HBXtSqVcf1LRst/3AfwIo8V7Dg5 eWu/VA0FzGpuUeUCDJoNmi4A65KotFUMM2x4oefgqPuhF4vmp5exhKq73jqWOHyDtR6F 7UZglunSRoTlzpDafQFFbsIAEwf7IYzLnLZtd7kZ2NWUtTERIJFAlBbK6KSJuhs6pVX6 sPthA65fqgAtE3r9wSAjM84KXOwa4DpYq7FLX8mT80CIbqMd3MhJ6hwPvNwcs+55W/6W NgEWYN2y7rVOn6N8weKHOop0gyoI8+gGlbNPtfSkLmUnJy1RXSbquPLsljHfdecV6pyT 4c+A== X-Gm-Message-State: AOJu0Ywn4kidUuukqXuspi5Yt0NE93Ym4vgwurGBdL+nc5DqHpI3J42a zAoKrZWkcIg7XwTsn28yz6lYD831U9WUGsuVtZyIkw== X-Google-Smtp-Source: AGHT+IGuL71Qqq+B3ZoNSfRSYvixcskriWqtub8GfZjdAtfFQcg9wp/J3eFzFVVeO9Yc6WzZGwrrDA== X-Received: by 2002:a9d:76c7:0:b0:6c4:cdce:5de8 with SMTP id p7-20020a9d76c7000000b006c4cdce5de8mr2844464otl.26.1697741088859; Thu, 19 Oct 2023 11:44:48 -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 v123-20020a626181000000b00693411c6c3csm131801pfb.39.2023.10.19.11.44.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Oct 2023 11:44:48 -0700 (PDT) Message-ID: <4ce48cd8-a764-4ea2-a82e-484ef7960c59@linaro.org> Date: Thu, 19 Oct 2023 15:44:45 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 06/16] Remove 'shadow' and merge into 'nss' Content-Language: en-US To: Arjun Shankar , libc-alpha@sourceware.org References: <20231002130150.1497733-1-arjun@redhat.com> <20231002130150.1497733-7-arjun@redhat.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <20231002130150.1497733-7-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 shadow routines are entry points for nss functionality. > This commit removes the 'shadow' subdirectory and moves all > functionality and tests to 'nss'. References to shadow/ are accordingly > changed. LGTM, thanks. Reviewed-by: Adhemerval Zanella > --- > Makeconfig | 2 +- > include/shadow.h | 2 +- > nss/Makefile | 27 +++++++++++++++++++++++ > nss/Versions | 13 +++++++++++ > {shadow => nss}/fgetspent.c | 0 > {shadow => nss}/fgetspent_r.c | 0 > {shadow => nss}/getspent.c | 0 > {shadow => nss}/getspent_r.c | 0 > {shadow => nss}/getspnam.c | 0 > {shadow => nss}/getspnam_r.c | 0 > {shadow => nss}/lckpwdf.c | 0 > {shadow => nss}/putspent.c | 0 > {shadow => nss}/sgetspent.c | 0 > {shadow => nss}/sgetspent_r.c | 0 > {shadow => nss}/shadow.h | 0 > {shadow => nss}/tst-putspent.c | 0 > {shadow => nss}/tst-shadow.c | 0 > shadow/Makefile | 40 ---------------------------------- > shadow/Versions | 31 -------------------------- > 19 files changed, 42 insertions(+), 73 deletions(-) > rename {shadow => nss}/fgetspent.c (100%) > rename {shadow => nss}/fgetspent_r.c (100%) > rename {shadow => nss}/getspent.c (100%) > rename {shadow => nss}/getspent_r.c (100%) > rename {shadow => nss}/getspnam.c (100%) > rename {shadow => nss}/getspnam_r.c (100%) > rename {shadow => nss}/lckpwdf.c (100%) > rename {shadow => nss}/putspent.c (100%) > rename {shadow => nss}/sgetspent.c (100%) > rename {shadow => nss}/sgetspent_r.c (100%) > rename {shadow => nss}/shadow.h (100%) > rename {shadow => nss}/tst-putspent.c (100%) > rename {shadow => nss}/tst-shadow.c (100%) > delete mode 100644 shadow/Makefile > delete mode 100644 shadow/Versions > > diff --git a/Makeconfig b/Makeconfig > index e5badddbc4..fc35aee10b 100644 > --- a/Makeconfig > +++ b/Makeconfig > @@ -1353,7 +1353,7 @@ endif > all-subdirs = csu assert ctype locale intl catgets math setjmp signal \ > stdlib stdio-common libio malloc string wcsmbs time dirent \ > posix io termios resource misc socket sysvipc gmon \ > - gnulib iconv iconvdata wctype manual shadow po argp \ > + gnulib iconv iconvdata wctype manual po argp \ > localedata timezone rt conform debug mathvec support \ > dlfcn elf > > diff --git a/include/shadow.h b/include/shadow.h > index fb1681909f..bbb8be2ff0 100644 > --- a/include/shadow.h > +++ b/include/shadow.h > @@ -1,5 +1,5 @@ > #ifndef _SHADOW_H > -#include > +#include > > # ifndef _ISOMAC > > diff --git a/nss/Makefile b/nss/Makefile > index 28648ea884..84cf62af2b 100644 > --- a/nss/Makefile > +++ b/nss/Makefile > @@ -27,6 +27,7 @@ headers := \ > gshadow.h \ > nss.h \ > pwd.h \ > + shadow.h \ > # headers > > # This is the trivial part which goes into libc itself. > @@ -125,6 +126,30 @@ CFLAGS-getpwent.c += -fexceptions > CFLAGS-getpwent_r.c += -fexceptions > endif > > +# shadow routines > +routines += \ > + fgetspent \ > + fgetspent_r \ > + getspent \ > + getspent_r \ > + getspnam \ > + getspnam_r \ > + lckpwdf \ > + putspent \ > + sgetspent \ > + sgetspent_r \ > + # routines > + > +ifeq ($(have-thread-library),yes) > +CFLAGS-getspent_r.c += -fexceptions > +CFLAGS-getspent.c += -fexceptions > +CFLAGS-fgetspent.c += -fexceptions > +CFLAGS-fgetspent_r.c += -fexceptions $(libio-mtsafe) > +CFLAGS-putspent.c += -fexceptions $(libio-mtsafe) > +CFLAGS-getspnam.c += -fexceptions > +CFLAGS-getspnam_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. > @@ -177,7 +202,9 @@ tests := \ > tst-putgrent \ > tst-putpwent \ > tst-putsgent \ > + tst-putspent \ > tst-sgetsgent \ > + tst-shadow \ > # tests > > xtests = bug-erange > diff --git a/nss/Versions b/nss/Versions > index 58ca73c9df..632af25be4 100644 > --- a/nss/Versions > +++ b/nss/Versions > @@ -9,25 +9,37 @@ libc { > # e* > endgrent; > endpwent; > + endspent; > > # f* > fgetgrent; fgetgrent_r; > fgetpwent; fgetpwent_r; > + fgetspent; fgetspent_r; > > # g* > getgrent; getgrent_r; getgrgid; getgrgid_r; getgrnam; getgrnam_r; > getgroups; > getpw; getpwent; getpwent_r; getpwnam; getpwnam_r; getpwuid; getpwuid_r; > + getspent; getspent_r; getspnam; getspnam_r; > > # i* > initgroups; > > + # l* > + lckpwdf; > + > # p* > putpwent; > + putspent; > > # s* > setgrent; > setpwent; > + setspent; > + sgetspent; sgetspent_r; > + > + # u* > + ulckpwdf; > } > GLIBC_2.1 { > # p* > @@ -37,6 +49,7 @@ libc { > # g* > getgrent_r; getgrgid_r; getgrnam_r; > getpwent_r; getpwuid_r; getpwnam_r; > + getspent_r; getspnam_r; > } > GLIBC_2.2.2 { > __nss_hostname_digits_dots; > diff --git a/shadow/fgetspent.c b/nss/fgetspent.c > similarity index 100% > rename from shadow/fgetspent.c > rename to nss/fgetspent.c > diff --git a/shadow/fgetspent_r.c b/nss/fgetspent_r.c > similarity index 100% > rename from shadow/fgetspent_r.c > rename to nss/fgetspent_r.c > diff --git a/shadow/getspent.c b/nss/getspent.c > similarity index 100% > rename from shadow/getspent.c > rename to nss/getspent.c > diff --git a/shadow/getspent_r.c b/nss/getspent_r.c > similarity index 100% > rename from shadow/getspent_r.c > rename to nss/getspent_r.c > diff --git a/shadow/getspnam.c b/nss/getspnam.c > similarity index 100% > rename from shadow/getspnam.c > rename to nss/getspnam.c > diff --git a/shadow/getspnam_r.c b/nss/getspnam_r.c > similarity index 100% > rename from shadow/getspnam_r.c > rename to nss/getspnam_r.c > diff --git a/shadow/lckpwdf.c b/nss/lckpwdf.c > similarity index 100% > rename from shadow/lckpwdf.c > rename to nss/lckpwdf.c > diff --git a/shadow/putspent.c b/nss/putspent.c > similarity index 100% > rename from shadow/putspent.c > rename to nss/putspent.c > diff --git a/shadow/sgetspent.c b/nss/sgetspent.c > similarity index 100% > rename from shadow/sgetspent.c > rename to nss/sgetspent.c > diff --git a/shadow/sgetspent_r.c b/nss/sgetspent_r.c > similarity index 100% > rename from shadow/sgetspent_r.c > rename to nss/sgetspent_r.c > diff --git a/shadow/shadow.h b/nss/shadow.h > similarity index 100% > rename from shadow/shadow.h > rename to nss/shadow.h > diff --git a/shadow/tst-putspent.c b/nss/tst-putspent.c > similarity index 100% > rename from shadow/tst-putspent.c > rename to nss/tst-putspent.c > diff --git a/shadow/tst-shadow.c b/nss/tst-shadow.c > similarity index 100% > rename from shadow/tst-shadow.c > rename to nss/tst-shadow.c > diff --git a/shadow/Makefile b/shadow/Makefile > deleted file mode 100644 > index 0102a4d0e3..0000000000 > --- a/shadow/Makefile > +++ /dev/null > @@ -1,40 +0,0 @@ > -# Copyright (C) 1996-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 > -# . > - > -# > -# Makefile for shadow. > -# > -subdir := shadow > - > -include ../Makeconfig > - > -headers = shadow.h > -routines = getspent getspnam sgetspent fgetspent putspent \ > - getspent_r getspnam_r sgetspent_r fgetspent_r \ > - lckpwdf > - > -tests = tst-shadow tst-putspent > - > -CFLAGS-getspent_r.c += -fexceptions > -CFLAGS-getspent.c += -fexceptions > -CFLAGS-fgetspent.c += -fexceptions > -CFLAGS-fgetspent_r.c += -fexceptions $(libio-mtsafe) > -CFLAGS-putspent.c += -fexceptions $(libio-mtsafe) > -CFLAGS-getspnam.c += -fexceptions > -CFLAGS-getspnam_r.c += -fexceptions > - > -include ../Rules > diff --git a/shadow/Versions b/shadow/Versions > deleted file mode 100644 > index 38ab368fff..0000000000 > --- a/shadow/Versions > +++ /dev/null > @@ -1,31 +0,0 @@ > -libc { > - GLIBC_2.0 { > - # e* > - endspent; > - > - # f* > - fgetspent; fgetspent_r; > - > - # g* > - getspent; getspent_r; getspnam; getspnam_r; > - > - # l* > - lckpwdf; > - > - # p* > - putspent; > - > - # s* > - setspent; > - > - # s* > - sgetspent; sgetspent_r; > - > - # u* > - ulckpwdf; > - } > - GLIBC_2.1.2 { > - # g* > - getspent_r; getspnam_r; > - } > -}