aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makeconfig2
-rw-r--r--include/shadow.h2
-rw-r--r--nss/Makefile27
-rw-r--r--nss/Versions13
-rw-r--r--nss/fgetspent.c (renamed from shadow/fgetspent.c)0
-rw-r--r--nss/fgetspent_r.c (renamed from shadow/fgetspent_r.c)0
-rw-r--r--nss/getspent.c (renamed from shadow/getspent.c)0
-rw-r--r--nss/getspent_r.c (renamed from shadow/getspent_r.c)0
-rw-r--r--nss/getspnam.c (renamed from shadow/getspnam.c)0
-rw-r--r--nss/getspnam_r.c (renamed from shadow/getspnam_r.c)0
-rw-r--r--nss/lckpwdf.c (renamed from shadow/lckpwdf.c)0
-rw-r--r--nss/putspent.c (renamed from shadow/putspent.c)0
-rw-r--r--nss/sgetspent.c (renamed from shadow/sgetspent.c)0
-rw-r--r--nss/sgetspent_r.c (renamed from shadow/sgetspent_r.c)0
-rw-r--r--nss/shadow.h (renamed from shadow/shadow.h)0
-rw-r--r--nss/tst-putspent.c (renamed from shadow/tst-putspent.c)0
-rw-r--r--nss/tst-shadow.c (renamed from shadow/tst-shadow.c)0
-rw-r--r--shadow/Makefile40
-rw-r--r--shadow/Versions31
19 files changed, 42 insertions, 73 deletions
diff --git a/Makeconfig b/Makeconfig
index e5baddd..fc35aee 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 fb16819..bbb8be2 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 28648ea..84cf62a 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 58ca73c..632af25 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
index 541947b..541947b 100644
--- a/shadow/fgetspent.c
+++ b/nss/fgetspent.c
diff --git a/shadow/fgetspent_r.c b/nss/fgetspent_r.c
index 5323914..5323914 100644
--- a/shadow/fgetspent_r.c
+++ b/nss/fgetspent_r.c
diff --git a/shadow/getspent.c b/nss/getspent.c
index d2109f8..d2109f8 100644
--- a/shadow/getspent.c
+++ b/nss/getspent.c
diff --git a/shadow/getspent_r.c b/nss/getspent_r.c
index f63e44f..f63e44f 100644
--- a/shadow/getspent_r.c
+++ b/nss/getspent_r.c
diff --git a/shadow/getspnam.c b/nss/getspnam.c
index 889e11c..889e11c 100644
--- a/shadow/getspnam.c
+++ b/nss/getspnam.c
diff --git a/shadow/getspnam_r.c b/nss/getspnam_r.c
index 381362f..381362f 100644
--- a/shadow/getspnam_r.c
+++ b/nss/getspnam_r.c
diff --git a/shadow/lckpwdf.c b/nss/lckpwdf.c
index 3b36b2e..3b36b2e 100644
--- a/shadow/lckpwdf.c
+++ b/nss/lckpwdf.c
diff --git a/shadow/putspent.c b/nss/putspent.c
index a80711d..a80711d 100644
--- a/shadow/putspent.c
+++ b/nss/putspent.c
diff --git a/shadow/sgetspent.c b/nss/sgetspent.c
index 99c0973..99c0973 100644
--- a/shadow/sgetspent.c
+++ b/nss/sgetspent.c
diff --git a/shadow/sgetspent_r.c b/nss/sgetspent_r.c
index cb51db7..cb51db7 100644
--- a/shadow/sgetspent_r.c
+++ b/nss/sgetspent_r.c
diff --git a/shadow/shadow.h b/nss/shadow.h
index 76d1cd2..76d1cd2 100644
--- a/shadow/shadow.h
+++ b/nss/shadow.h
diff --git a/shadow/tst-putspent.c b/nss/tst-putspent.c
index 7b85096..7b85096 100644
--- a/shadow/tst-putspent.c
+++ b/nss/tst-putspent.c
diff --git a/shadow/tst-shadow.c b/nss/tst-shadow.c
index 48f7167..48f7167 100644
--- a/shadow/tst-shadow.c
+++ b/nss/tst-shadow.c
diff --git a/shadow/Makefile b/shadow/Makefile
deleted file mode 100644
index 0102a4d..0000000
--- 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 38ab368..0000000
--- 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;
- }
-}