diff options
author | Arjun Shankar <arjun@redhat.com> | 2023-10-02 14:55:17 +0200 |
---|---|---|
committer | Arjun Shankar <arjun@redhat.com> | 2023-10-24 12:30:59 +0200 |
commit | 0ac35d181edd38563f95c3b38e74476bfbff76d3 (patch) | |
tree | 7f0cdb954a8d458a895d3aa138882b79397381d6 | |
parent | 98b107e30848198e7128f80b38b406585f0317d6 (diff) | |
download | glibc-0ac35d181edd38563f95c3b38e74476bfbff76d3.zip glibc-0ac35d181edd38563f95c3b38e74476bfbff76d3.tar.gz glibc-0ac35d181edd38563f95c3b38e74476bfbff76d3.tar.bz2 |
Remove 'pwd' and merge into 'nss'
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.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
-rw-r--r-- | Makeconfig | 2 | ||||
-rw-r--r-- | include/pwd.h | 2 | ||||
-rw-r--r-- | nss/Makefile | 24 | ||||
-rw-r--r-- | nss/Versions | 8 | ||||
-rw-r--r-- | nss/fgetpwent.c (renamed from pwd/fgetpwent.c) | 0 | ||||
-rw-r--r-- | nss/fgetpwent_r.c (renamed from pwd/fgetpwent_r.c) | 0 | ||||
-rw-r--r-- | nss/getpw.c (renamed from pwd/getpw.c) | 0 | ||||
-rw-r--r-- | nss/getpwent.c (renamed from pwd/getpwent.c) | 0 | ||||
-rw-r--r-- | nss/getpwent_r.c (renamed from pwd/getpwent_r.c) | 0 | ||||
-rw-r--r-- | nss/getpwnam.c (renamed from pwd/getpwnam.c) | 0 | ||||
-rw-r--r-- | nss/getpwnam_r.c (renamed from pwd/getpwnam_r.c) | 0 | ||||
-rw-r--r-- | nss/getpwuid.c (renamed from pwd/getpwuid.c) | 0 | ||||
-rw-r--r-- | nss/getpwuid_r.c (renamed from pwd/getpwuid_r.c) | 0 | ||||
-rw-r--r-- | nss/putpwent.c (renamed from pwd/putpwent.c) | 0 | ||||
-rw-r--r-- | nss/pwd.h (renamed from pwd/pwd.h) | 0 | ||||
-rw-r--r-- | nss/tst-getpw.c (renamed from pwd/tst-getpw.c) | 0 | ||||
-rw-r--r-- | nss/tst-putpwent.c (renamed from pwd/tst-putpwent.c) | 0 | ||||
-rw-r--r-- | pwd/Makefile | 42 | ||||
-rw-r--r-- | pwd/Versions | 19 |
19 files changed, 34 insertions, 63 deletions
@@ -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 f8975d4..c4ca8ba 100644 --- a/include/pwd.h +++ b/include/pwd.h @@ -1,5 +1,5 @@ #ifndef _PWD_H -#include <pwd/pwd.h> +#include <nss/pwd.h> #ifndef _ISOMAC /* Now define the internal interfaces. */ diff --git a/nss/Makefile b/nss/Makefile index 5256b90..28648ea 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 6204ac0..58ca73c 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 index b7864d2..b7864d2 100644 --- a/pwd/fgetpwent.c +++ b/nss/fgetpwent.c diff --git a/pwd/fgetpwent_r.c b/nss/fgetpwent_r.c index 5427447..5427447 100644 --- a/pwd/fgetpwent_r.c +++ b/nss/fgetpwent_r.c diff --git a/pwd/getpw.c b/nss/getpw.c index cf74737..cf74737 100644 --- a/pwd/getpw.c +++ b/nss/getpw.c diff --git a/pwd/getpwent.c b/nss/getpwent.c index eb65bdc..eb65bdc 100644 --- a/pwd/getpwent.c +++ b/nss/getpwent.c diff --git a/pwd/getpwent_r.c b/nss/getpwent_r.c index f26bf89..f26bf89 100644 --- a/pwd/getpwent_r.c +++ b/nss/getpwent_r.c diff --git a/pwd/getpwnam.c b/nss/getpwnam.c index 9a28d53..9a28d53 100644 --- a/pwd/getpwnam.c +++ b/nss/getpwnam.c diff --git a/pwd/getpwnam_r.c b/nss/getpwnam_r.c index e910670..e910670 100644 --- a/pwd/getpwnam_r.c +++ b/nss/getpwnam_r.c diff --git a/pwd/getpwuid.c b/nss/getpwuid.c index d92fb22..d92fb22 100644 --- a/pwd/getpwuid.c +++ b/nss/getpwuid.c diff --git a/pwd/getpwuid_r.c b/nss/getpwuid_r.c index 763fad5..763fad5 100644 --- a/pwd/getpwuid_r.c +++ b/nss/getpwuid_r.c diff --git a/pwd/putpwent.c b/nss/putpwent.c index 335e20a..335e20a 100644 --- a/pwd/putpwent.c +++ b/nss/putpwent.c diff --git a/pwd/tst-getpw.c b/nss/tst-getpw.c index 30d4740..30d4740 100644 --- a/pwd/tst-getpw.c +++ b/nss/tst-getpw.c diff --git a/pwd/tst-putpwent.c b/nss/tst-putpwent.c index 3014e0a..3014e0a 100644 --- a/pwd/tst-putpwent.c +++ b/nss/tst-putpwent.c diff --git a/pwd/Makefile b/pwd/Makefile deleted file mode 100644 index d85842a..0000000 --- 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 -# <https://www.gnu.org/licenses/>. - -# -# 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 b569700..0000000 --- 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; - } -} |