]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/string/: Move string-related files to string/ subdir
authorAlejandro Colomar <alx@kernel.org>
Tue, 28 Nov 2023 01:48:37 +0000 (02:48 +0100)
committerSerge Hallyn <serge@hallyn.com>
Sun, 3 Dec 2023 18:22:11 +0000 (12:22 -0600)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
42 files changed:
lib/Makefile.am
lib/console.c
lib/copydir.c
lib/date_to_str.c
lib/env.c
lib/failure.c
lib/getdef.c
lib/idmapping.c
lib/log.c
lib/mail.c
lib/prefix_flag.c
lib/setupenv.c
lib/string/sprintf.c [moved from lib/sprintf.c with 93% similarity]
lib/string/sprintf.h [moved from lib/sprintf.h with 100% similarity]
lib/string/stpecpy.c [moved from lib/stpecpy.c with 91% similarity]
lib/string/stpecpy.h [moved from lib/stpecpy.h with 100% similarity]
lib/string/stpeprintf.c [moved from lib/stpeprintf.c with 93% similarity]
lib/string/stpeprintf.h [moved from lib/stpeprintf.h with 100% similarity]
lib/string/strncpy.h [moved from lib/strncpy.h with 100% similarity]
lib/string/strtcpy.c [moved from lib/strtcpy.c with 91% similarity]
lib/string/strtcpy.h [moved from lib/strtcpy.h with 100% similarity]
lib/string/zustr2stp.c [moved from lib/zustr2stp.c with 90% similarity]
lib/string/zustr2stp.h [moved from lib/zustr2stp.h with 100% similarity]
lib/utmp.c
src/chage.c
src/chfn.c
src/chsh.c
src/gpasswd.c
src/groupmod.c
src/login.c
src/logoutd.c
src/passwd.c
src/su.c
src/sulogin.c
src/useradd.c
src/userdel.c
src/usermod.c
src/vipw.c
tests/unit/Makefile.am
tests/unit/test_strncpy.c
tests/unit/test_strtcpy.c
tests/unit/test_xasprintf.c

index 36e04014d21c352b2e0069ed0adafc05f3841787..cc79326b38321ee59b9e4c996c64b21978b57685 100644 (file)
@@ -134,17 +134,19 @@ libshadow_la_SOURCES = \
        shell.c \
        sizeof.h \
        spawn.c \
-       sprintf.c \
-       sprintf.h \
        sssd.c \
        sssd.h \
-       stpecpy.c \
-       stpecpy.h \
-       stpeprintf.c \
-       stpeprintf.h \
-       strncpy.h \
-       strtcpy.c \
-       strtcpy.h \
+       string/sprintf.c \
+       string/sprintf.h \
+       string/stpecpy.c \
+       string/stpecpy.h \
+       string/stpeprintf.c \
+       string/stpeprintf.h \
+       string/strncpy.h \
+       string/strtcpy.c \
+       string/strtcpy.h \
+       string/zustr2stp.c \
+       string/zustr2stp.h \
        strtoday.c \
        sub.c \
        subordinateio.h \
@@ -162,9 +164,7 @@ libshadow_la_SOURCES = \
        xgetgrnam.c \
        xgetgrgid.c \
        xgetspnam.c \
-       yesno.c \
-       zustr2stp.c \
-       zustr2stp.h
+       yesno.c
 
 if WITH_TCB
 libshadow_la_SOURCES += tcbfuncs.c tcbfuncs.h
index b1d58c978855bbd3cd75cb654b9d8058afa65528..92065d9b0a9314057b95801cb4af60ce587d3716 100644 (file)
@@ -13,7 +13,7 @@
 #include <stdio.h>
 #include "getdef.h"
 #include "prototypes.h"
-#include "strtcpy.h"
+#include "string/strtcpy.h"
 
 #ident "$Id$"
 
index 6d292dafa8001046b009fe9a8812628cf2728afc..a5ea7efba21cab67e42909c8e86fc8084216ea13 100644 (file)
@@ -36,7 +36,7 @@
 #include <attr/libattr.h>
 #endif                         /* WITH_ATTR */
 #include "shadowlog.h"
-#include "sprintf.h"
+#include "string/sprintf.h"
 
 
 static /*@null@*/const char *src_orig;
index 9ae31f07b3d3000265ac168d0a23204a3a026bbc..cbba0e464c952781f13a50eaab1c6328260632e3 100644 (file)
@@ -11,7 +11,7 @@
 
 #ident "$Id$"
 
-#include "strtcpy.h"
+#include "string/strtcpy.h"
 #include "prototypes.h"
 
 
index d823411ec6d7215f0839f38fbd5bb52c1536d9b1..dc35c54d9dff027138faef17ad8e71c16a44429a 100644 (file)
--- a/lib/env.c
+++ b/lib/env.c
@@ -20,7 +20,7 @@
 #include "prototypes.h"
 #include "defines.h"
 #include "shadowlog.h"
-#include "sprintf.h"
+#include "string/sprintf.h"
 
 
 /*
index c4a434ffb1c7a89340e0fe7ab3aa3241e15da875..8a196fd8cbec80f1b59cb2c1f92a169b11f546ef 100644 (file)
@@ -19,7 +19,7 @@
 #include "failure.h"
 #include "memzero.h"
 #include "prototypes.h"
-#include "strtcpy.h"
+#include "string/strtcpy.h"
 
 
 #define        YEAR    (365L*DAY)
index d64e6343c60fcf46596ab0344765f7c077b85499..1a72453fadf2472323c9087b082c33fea32ef6d2 100644 (file)
@@ -25,7 +25,7 @@
 #include "alloc.h"
 #include "getdef.h"
 #include "shadowlog_internal.h"
-#include "sprintf.h"
+#include "string/sprintf.h"
 
 
 /*
index a2e74380bf1f016932dbcd670e96007a3d56f458..3fcad8d3c67ababe91a043c616212f7e251adab9 100644 (file)
@@ -15,7 +15,7 @@
 
 #include "alloc.h"
 #include "prototypes.h"
-#include "stpeprintf.h"
+#include "string/stpeprintf.h"
 #include "idmapping.h"
 #if HAVE_SYS_CAPABILITY_H
 #include <sys/prctl.h>
index 6ab1701fabf0fe558eb36586c1109eec00e9e183..c6801185a0438f077cee0defbc52989ece13b7cd 100644 (file)
--- a/lib/log.c
+++ b/lib/log.c
@@ -19,8 +19,8 @@
 #include <lastlog.h>
 #include "memzero.h"
 #include "prototypes.h"
-#include "strncpy.h"
-#include "strtcpy.h"
+#include "string/strncpy.h"
+#include "string/strtcpy.h"
 
 
 /*
index 5c8b4e6177c814e61ad7e012eaecda85cb8ddf6a..d14bdb18ac1825a5712c14b986c358eb503258ab 100644 (file)
@@ -17,7 +17,7 @@
 
 #include "alloc.h"
 #include "getdef.h"
-#include "sprintf.h"
+#include "string/sprintf.h"
 
 #ident "$Id$"
 
index d55aeb97861797378dc5d2807e4a9c504d459ec0..74500ba6d80786c3ff6ade1d798b5c906ac5f374 100644 (file)
@@ -28,7 +28,7 @@
 #endif                         /* ENABLE_SUBIDS */
 #include "getdef.h"
 #include "shadowlog.h"
-#include "sprintf.h"
+#include "string/sprintf.h"
 
 
 static char *passwd_db_file = NULL;
index f305b866f02898e305dfdd3ba066a9e9623464a2..c9b7f26fef29f2e6f769a791e5ca86efb4cdbe3d 100644 (file)
@@ -27,7 +27,7 @@
 #include <pwd.h>
 #include "getdef.h"
 #include "shadowlog.h"
-#include "sprintf.h"
+#include "string/sprintf.h"
 
 
 #ifndef USE_PAM
similarity index 93%
rename from lib/sprintf.c
rename to lib/string/sprintf.c
index fee58ca9ec659fcda1fb624181e766f493e7fcc2..5b421ad0ebf7a4fd681c192e66cc002429b9523a 100644 (file)
@@ -7,7 +7,7 @@
 
 #ident "$Id$"
 
-#include "sprintf.h"
+#include "string/sprintf.h"
 
 #include <stdarg.h>
 #include <stddef.h>
similarity index 100%
rename from lib/sprintf.h
rename to lib/string/sprintf.h
similarity index 91%
rename from lib/stpecpy.c
rename to lib/string/stpecpy.c
index faa02d695a1f80fca7fe12b48c98517f3dd37403..97593884a2aeaf24bde66101f22da5bce4dd33be 100644 (file)
@@ -11,7 +11,7 @@
 
 #ident "$Id$"
 
-#include "stpecpy.h"
+#include "string/stpecpy.h"
 
 
 extern inline char *stpecpy(char *dst, char *end, const char *restrict src);
similarity index 100%
rename from lib/stpecpy.h
rename to lib/string/stpecpy.h
similarity index 93%
rename from lib/stpeprintf.c
rename to lib/string/stpeprintf.c
index f3238eafbebd533828261c30ee27c1d9d9f7bffb..cecd95d7ed1f979cc669bb1b115067c328bd65b9 100644 (file)
@@ -11,7 +11,7 @@
 
 #ident "$Id$"
 
-#include "stpeprintf.h"
+#include "string/stpeprintf.h"
 
 #include <stdarg.h>
 
similarity index 100%
rename from lib/stpeprintf.h
rename to lib/string/stpeprintf.h
similarity index 100%
rename from lib/strncpy.h
rename to lib/string/strncpy.h
similarity index 91%
rename from lib/strtcpy.c
rename to lib/string/strtcpy.c
index 09800470343e626249c62f7ca26e73f6f52e1109..74de4fc4b5c687e8d02dad8ee210c6b8856ec6e5 100644 (file)
@@ -11,7 +11,7 @@
 
 #ident "$Id$"
 
-#include "strtcpy.h"
+#include "string/strtcpy.h"
 
 
 extern inline ssize_t strtcpy(char *restrict dst, const char *restrict src,
similarity index 100%
rename from lib/strtcpy.h
rename to lib/string/strtcpy.h
similarity index 90%
rename from lib/zustr2stp.c
rename to lib/string/zustr2stp.c
index 8dfe87057c0cc32ac162830cb66c03459f89cf08..e27ced3fb6a34d44377af3e52d9a7ff2f6a59c6b 100644 (file)
@@ -10,7 +10,7 @@
 
 #ident "$Id$"
 
-#include "zustr2stp.h"
+#include "string/zustr2stp.h"
 
 
 extern inline char *zustr2stp(char *restrict dst, const char *restrict src,
similarity index 100%
rename from lib/zustr2stp.h
rename to lib/string/zustr2stp.h
index bf878ce6bb7fa33e27c366bb5ccc4a20e9cf077e..dabe8b2e81e1f239ae41b6f1d03be08ce954d162 100644 (file)
@@ -24,9 +24,9 @@
 
 #include "alloc.h"
 #include "sizeof.h"
-#include "strtcpy.h"
-#include "strncpy.h"
-#include "zustr2stp.h"
+#include "string/strncpy.h"
+#include "string/strtcpy.h"
+#include "string/zustr2stp.h"
 
 #ident "$Id$"
 
index c3e457c97ab9e60bf2354301fe34b011dda72e71..025bdb18cee9373e061424f1c843d322bf00f004 100644 (file)
@@ -33,7 +33,7 @@
 #include "pwio.h"
 #include "shadowio.h"
 #include "shadowlog.h"
-#include "strtcpy.h"
+#include "string/strtcpy.h"
 #ifdef WITH_TCB
 #include "tcbfuncs.h"
 #endif
index 60e90c8aa41a6ab0bca202ff3af9366278c98f22..417ac35f1c1468228c93672ddf445dc4888b8f4b 100644 (file)
@@ -32,7 +32,7 @@
 /*@-exitarg@*/
 #include "exitcodes.h"
 #include "shadowlog.h"
-#include "strtcpy.h"
+#include "string/strtcpy.h"
 
 /*
  * Global variables.
index 3ae8b5108a30d574e3eb1179920f6ab7e230eaba..32b3a4d8b95ab12e2c2b092dffb0088f4deae955 100644 (file)
@@ -31,7 +31,7 @@
 /*@-exitarg@*/
 #include "exitcodes.h"
 #include "shadowlog.h"
-#include "strtcpy.h"
+#include "string/strtcpy.h"
 
 #ifndef SHELLS_FILE
 #define SHELLS_FILE "/etc/shells"
index e2aa0b13e001bf548c2fcb596b1665f083e146d0..70002eb1db37b9658bf248c09d0ad453613bcb27 100644 (file)
@@ -35,7 +35,7 @@
 /*@-exitarg@*/
 #include "exitcodes.h"
 #include "shadowlog.h"
-#include "strtcpy.h"
+#include "string/strtcpy.h"
 
 /*
  * Global variables
index 3c04cdbd350cedee651d8858f45f6ea3c451948c..084c5d56103d809bb8fddd1642c3940a03ac05b9 100644 (file)
@@ -38,8 +38,8 @@
 #include "sgroupio.h"
 #endif
 #include "shadowlog.h"
-#include "stpecpy.h"
-#include "stpeprintf.h"
+#include "string/stpecpy.h"
+#include "string/stpeprintf.h"
 /*
  * exit status values
  */
index 11abe0639b26ad4c83038e08a8a0c375852e38f0..d5ef87d8a928bc52fcfaaf468c114b65013c5db4 100644 (file)
@@ -37,7 +37,7 @@
 /*@-exitarg@*/
 #include "exitcodes.h"
 #include "shadowlog.h"
-#include "strtcpy.h"
+#include "string/strtcpy.h"
 
 #ifdef USE_PAM
 #include "pam_defs.h"
index 41458c3c2673302d6afc0a9c105f1a90f18179ec..11ccf05f691dc64a11e298074cd98efadbf829bc 100644 (file)
@@ -20,7 +20,7 @@
 #include "prototypes.h"
 #include "shadowlog.h"
 #include "sizeof.h"
-#include "zustr2stp.h"
+#include "string/zustr2stp.h"
 /*
  * Global variables
  */
index a4f493209aa82c707f33d99b46487512ce0b4789..aef5b0512c14937a942a735f35eb9e5fa8916625 100644 (file)
@@ -32,7 +32,7 @@
 #include "pwio.h"
 #include "shadowio.h"
 #include "shadowlog.h"
-#include "strtcpy.h"
+#include "string/strtcpy.h"
 
 /*
  * exit status values
index af5f29aee6a00fafc03e7a3d0a236ced1d73c7fc..362841fb882ec8ce0ae2a8fce1bb973e65f8c448 100644 (file)
--- a/src/su.c
+++ b/src/su.c
@@ -58,7 +58,7 @@
 /*@-exitarg@*/
 #include "exitcodes.h"
 #include "shadowlog.h"
-#include "strtcpy.h"
+#include "string/strtcpy.h"
 
 /*
  * Global variables
index eb99973f858df1f1ee7de21d1b6da024b5bd7703..0bb9d900b9712b46164395ba35cdd9c27c323044 100644 (file)
@@ -27,7 +27,7 @@
 /*@-exitarg@*/
 #include "exitcodes.h"
 #include "shadowlog.h"
-#include "strtcpy.h"
+#include "string/strtcpy.h"
 
 /*
  * Global variables
index 8a5974822f1c4735cd986dde0f8ca8fc4386f468..062daeac0f8edbe9dae8cd441ad0115b3a13f735 100644 (file)
@@ -63,7 +63,7 @@
 #include "tcbfuncs.h"
 #endif
 #include "shadowlog.h"
-#include "sprintf.h"
+#include "string/sprintf.h"
 
 
 #ifndef SKEL_DIR
index 14bbbd707115a1c17e2b4b02b14e1bd9cad48886..ce7ece22938de4da50dbb610c2102f88147b9f4b 100644 (file)
@@ -52,7 +52,7 @@
 #include "subordinateio.h"
 #endif                         /* ENABLE_SUBIDS */
 #include "shadowlog.h"
-#include "sprintf.h"
+#include "string/sprintf.h"
 
 
 /*
index d279981bb40a36bdf31f2914ffe65364cd776a7a..06fe931cb65bfa61cde7eefe4b975262027bfc0a 100644 (file)
@@ -58,7 +58,7 @@
 #include "tcbfuncs.h"
 #endif
 #include "shadowlog.h"
-#include "sprintf.h"
+#include "string/sprintf.h"
 
 
 /*
index ab1c811643db7fb490524a493a6b6f8779a4b696..50d28eb4200da1edf011caeb5bc815c19a2952e2 100644 (file)
@@ -44,7 +44,7 @@
 #include "tcbfuncs.h"
 #endif                         /* WITH_TCB */
 #include "shadowlog.h"
-#include "sprintf.h"
+#include "string/sprintf.h"
 
 
 #define MSG_WARN_EDIT_OTHER_FILE _( \
index 3e3144ded18de5791e09bb0138e1931ef51a9e6b..7416a1ded6de92a87b22740b916d2dc76cb2c0bc 100644 (file)
@@ -60,7 +60,7 @@ test_strncpy_LDADD = \
     $(NULL)
 
 test_strtcpy_SOURCES = \
-    ../../lib/strtcpy.c \
+    ../../lib/string/strtcpy.c \
     test_strtcpy.c \
     $(NULL)
 test_strtcpy_CFLAGS = \
@@ -73,7 +73,7 @@ test_strtcpy_LDADD = \
     $(NULL)
 
 test_xasprintf_SOURCES = \
-    ../../lib/sprintf.c \
+    ../../lib/string/sprintf.c \
     test_xasprintf.c \
     $(NULL)
 test_xasprintf_CFLAGS = \
index f5b189ff7e18717d867ec539b859ed8a5cca3839..968765bb15511e35ba61a9353545a1b59f77edce 100644 (file)
@@ -15,7 +15,7 @@
 #include <cmocka.h>
 
 #include "sizeof.h"
-#include "strncpy.h"
+#include "string/strncpy.h"
 
 
 static void test_STRNCPY_trunc(void **state);
index 935a30cfb5133306e52a78a310399986d785e082..12351a5372f99dbc3d0853103c510f98e305fcb9 100644 (file)
@@ -15,7 +15,7 @@
 #include <cmocka.h>
 
 #include "sizeof.h"
-#include "strtcpy.h"
+#include "string/strtcpy.h"
 
 
 static void test_STRTCPY_trunc(void **state);
index 25e36ca59aa34883555ff8205bee3c3b30c5faf9..4b5d0935c4111c4e0798a3d61abda87c40445e70 100644 (file)
@@ -15,7 +15,7 @@
 #include <stdint.h>  // Required by <cmocka.h>
 #include <cmocka.h>
 
-#include "sprintf.h"
+#include "string/sprintf.h"
 
 
 #define assert_unreachable()  assert_true(0)