From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Arjun Shankar <arjun@redhat.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH 06/16] Remove 'shadow' and merge into 'nss'
Date: Thu, 19 Oct 2023 15:44:45 -0300 [thread overview]
Message-ID: <4ce48cd8-a764-4ea2-a82e-484ef7960c59@linaro.org> (raw)
In-Reply-To: <20231002130150.1497733-7-arjun@redhat.com>
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 <adhemerval.zanella@linaro.org>
> ---
> 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 <shadow/shadow.h>
> +#include <nss/shadow.h>
>
> # 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
> -# <https://www.gnu.org/licenses/>.
> -
> -#
> -# 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;
> - }
> -}
next prev parent reply other threads:[~2023-10-19 18:44 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-02 12:55 [PATCH 00/16] Consolidate NSS functionality into nss subdir Arjun Shankar
2023-10-02 12:55 ` [PATCH 01/16] inet: Rearrange and sort Makefile variables Arjun Shankar
2023-10-02 14:11 ` Siddhesh Poyarekar
2023-10-02 12:55 ` [PATCH 02/16] nss: " Arjun Shankar
2023-10-02 14:12 ` Siddhesh Poyarekar
2023-10-02 12:55 ` [PATCH 03/16] Remove 'grp' and merge into 'nss' and 'posix' Arjun Shankar
2023-10-19 17:55 ` Adhemerval Zanella Netto
2023-10-02 12:55 ` [PATCH 04/16] Remove 'gshadow' and merge into 'nss' Arjun Shankar
2023-10-19 18:15 ` Adhemerval Zanella Netto
2023-10-02 12:55 ` [PATCH 05/16] Remove 'pwd' " Arjun Shankar
2023-10-19 18:29 ` Adhemerval Zanella Netto
2023-10-02 12:55 ` [PATCH 06/16] Remove 'shadow' " Arjun Shankar
2023-10-19 18:44 ` Adhemerval Zanella Netto [this message]
2023-10-02 12:55 ` [PATCH 07/16] Move 'aliases' routines from 'inet' " Arjun Shankar
2023-10-19 19:23 ` Adhemerval Zanella Netto
2023-10-02 12:55 ` [PATCH 08/16] Move 'ethers' " Arjun Shankar
2023-10-19 19:39 ` Adhemerval Zanella Netto
2023-10-02 12:55 ` [PATCH 09/16] Move 'hosts' " Arjun Shankar
2023-10-19 19:53 ` Adhemerval Zanella Netto
2023-10-02 12:55 ` [PATCH 10/16] Move 'netgroup' " Arjun Shankar
2023-10-20 12:00 ` Adhemerval Zanella Netto
2023-10-02 12:55 ` [PATCH 11/16] Move 'networks' " Arjun Shankar
2023-10-20 12:17 ` Adhemerval Zanella Netto
2023-10-02 12:55 ` [PATCH 12/16] Move 'protocols' " Arjun Shankar
2023-10-20 12:32 ` Adhemerval Zanella Netto
2023-10-02 12:55 ` [PATCH 13/16] Move 'rpc' " Arjun Shankar
2023-10-20 12:49 ` Adhemerval Zanella Netto
2023-10-02 12:55 ` [PATCH 14/16] Move 'services' " Arjun Shankar
2023-10-20 13:19 ` Adhemerval Zanella Netto
2023-10-02 12:55 ` [PATCH 15/16] Move getaddrinfo from 'posix' " Arjun Shankar
2023-10-20 13:51 ` Adhemerval Zanella Netto
2023-10-24 21:32 ` Joseph Myers
2023-10-26 10:58 ` Arjun Shankar
2023-10-02 12:55 ` [PATCH 16/16] Move getnameinfo from 'inet' to 'nss' Arjun Shankar
2023-10-20 15:08 ` Adhemerval Zanella Netto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ce48cd8-a764-4ea2-a82e-484ef7960c59@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=arjun@redhat.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).