]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Remove 'shadow' and merge into 'nss'
authorArjun Shankar <arjun@redhat.com>
Mon, 2 Oct 2023 12:55:18 +0000 (14:55 +0200)
committerArjun Shankar <arjun@redhat.com>
Tue, 24 Oct 2023 10:30:59 +0000 (12:30 +0200)
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.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
19 files changed:
Makeconfig
include/shadow.h
nss/Makefile
nss/Versions
nss/fgetspent.c [moved from shadow/fgetspent.c with 100% similarity]
nss/fgetspent_r.c [moved from shadow/fgetspent_r.c with 100% similarity]
nss/getspent.c [moved from shadow/getspent.c with 100% similarity]
nss/getspent_r.c [moved from shadow/getspent_r.c with 100% similarity]
nss/getspnam.c [moved from shadow/getspnam.c with 100% similarity]
nss/getspnam_r.c [moved from shadow/getspnam_r.c with 100% similarity]
nss/lckpwdf.c [moved from shadow/lckpwdf.c with 100% similarity]
nss/putspent.c [moved from shadow/putspent.c with 100% similarity]
nss/sgetspent.c [moved from shadow/sgetspent.c with 100% similarity]
nss/sgetspent_r.c [moved from shadow/sgetspent_r.c with 100% similarity]
nss/shadow.h [moved from shadow/shadow.h with 100% similarity]
nss/tst-putspent.c [moved from shadow/tst-putspent.c with 100% similarity]
nss/tst-shadow.c [moved from shadow/tst-shadow.c with 100% similarity]
shadow/Makefile [deleted file]
shadow/Versions [deleted file]

index e5badddbc4cdf79c4909728abbf58b4f1c973f08..fc35aee10bdaae5d79d8621fc5ae88def7964d19 100644 (file)
@@ -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
 
index fb1681909f1ebddc06a7bc6511d5ddabd69db240..bbb8be2ff040d047fac9ecafd4e1f6c749646391 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef _SHADOW_H
-#include <shadow/shadow.h>
+#include <nss/shadow.h>
 
 # ifndef _ISOMAC
 
index 28648ea884324e9d2f87bef6b60551d4c59b8a4e..84cf62af2beb4ec95637ba6b4f52f76598e7a151 100644 (file)
@@ -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
index 58ca73c9df8c1b4fc18ffb6aa05ca1cc931fa242..632af25be424cae6ae609280279105034007eb0e 100644 (file)
@@ -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;
similarity index 100%
rename from shadow/fgetspent.c
rename to nss/fgetspent.c
similarity index 100%
rename from shadow/fgetspent_r.c
rename to nss/fgetspent_r.c
similarity index 100%
rename from shadow/getspent.c
rename to nss/getspent.c
similarity index 100%
rename from shadow/getspent_r.c
rename to nss/getspent_r.c
similarity index 100%
rename from shadow/getspnam.c
rename to nss/getspnam.c
similarity index 100%
rename from shadow/getspnam_r.c
rename to nss/getspnam_r.c
similarity index 100%
rename from shadow/lckpwdf.c
rename to nss/lckpwdf.c
similarity index 100%
rename from shadow/putspent.c
rename to nss/putspent.c
similarity index 100%
rename from shadow/sgetspent.c
rename to nss/sgetspent.c
similarity index 100%
rename from shadow/sgetspent_r.c
rename to nss/sgetspent_r.c
similarity index 100%
rename from shadow/shadow.h
rename to nss/shadow.h
similarity index 100%
rename from shadow/tst-putspent.c
rename to nss/tst-putspent.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 (file)
index 0102a4d..0000000
+++ /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 (file)
index 38ab368..0000000
+++ /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;
-  }
-}