diff --git a/lib/Makefile.am b/lib/Makefile.am index 36e04014d..cc79326b3 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -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 diff --git a/lib/console.c b/lib/console.c index b1d58c978..92065d9b0 100644 --- a/lib/console.c +++ b/lib/console.c @@ -13,7 +13,7 @@ #include #include "getdef.h" #include "prototypes.h" -#include "strtcpy.h" +#include "string/strtcpy.h" #ident "$Id$" diff --git a/lib/copydir.c b/lib/copydir.c index 6d292dafa..a5ea7efba 100644 --- a/lib/copydir.c +++ b/lib/copydir.c @@ -36,7 +36,7 @@ #include #endif /* WITH_ATTR */ #include "shadowlog.h" -#include "sprintf.h" +#include "string/sprintf.h" static /*@null@*/const char *src_orig; diff --git a/lib/date_to_str.c b/lib/date_to_str.c index 9ae31f07b..cbba0e464 100644 --- a/lib/date_to_str.c +++ b/lib/date_to_str.c @@ -11,7 +11,7 @@ #ident "$Id$" -#include "strtcpy.h" +#include "string/strtcpy.h" #include "prototypes.h" diff --git a/lib/env.c b/lib/env.c index d823411ec..dc35c54d9 100644 --- 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" /* diff --git a/lib/failure.c b/lib/failure.c index c4a434ffb..8a196fd8c 100644 --- a/lib/failure.c +++ b/lib/failure.c @@ -19,7 +19,7 @@ #include "failure.h" #include "memzero.h" #include "prototypes.h" -#include "strtcpy.h" +#include "string/strtcpy.h" #define YEAR (365L*DAY) diff --git a/lib/getdef.c b/lib/getdef.c index d64e6343c..1a72453fa 100644 --- a/lib/getdef.c +++ b/lib/getdef.c @@ -25,7 +25,7 @@ #include "alloc.h" #include "getdef.h" #include "shadowlog_internal.h" -#include "sprintf.h" +#include "string/sprintf.h" /* diff --git a/lib/idmapping.c b/lib/idmapping.c index a2e74380b..3fcad8d3c 100644 --- a/lib/idmapping.c +++ b/lib/idmapping.c @@ -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 diff --git a/lib/log.c b/lib/log.c index 6ab1701fa..c6801185a 100644 --- a/lib/log.c +++ b/lib/log.c @@ -19,8 +19,8 @@ #include #include "memzero.h" #include "prototypes.h" -#include "strncpy.h" -#include "strtcpy.h" +#include "string/strncpy.h" +#include "string/strtcpy.h" /* diff --git a/lib/mail.c b/lib/mail.c index 5c8b4e617..d14bdb18a 100644 --- a/lib/mail.c +++ b/lib/mail.c @@ -17,7 +17,7 @@ #include "alloc.h" #include "getdef.h" -#include "sprintf.h" +#include "string/sprintf.h" #ident "$Id$" diff --git a/lib/prefix_flag.c b/lib/prefix_flag.c index d55aeb978..74500ba6d 100644 --- a/lib/prefix_flag.c +++ b/lib/prefix_flag.c @@ -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; diff --git a/lib/setupenv.c b/lib/setupenv.c index f305b866f..c9b7f26fe 100644 --- a/lib/setupenv.c +++ b/lib/setupenv.c @@ -27,7 +27,7 @@ #include #include "getdef.h" #include "shadowlog.h" -#include "sprintf.h" +#include "string/sprintf.h" #ifndef USE_PAM diff --git a/lib/sprintf.c b/lib/string/sprintf.c similarity index 93% rename from lib/sprintf.c rename to lib/string/sprintf.c index fee58ca9e..5b421ad0e 100644 --- a/lib/sprintf.c +++ b/lib/string/sprintf.c @@ -7,7 +7,7 @@ #ident "$Id$" -#include "sprintf.h" +#include "string/sprintf.h" #include #include diff --git a/lib/sprintf.h b/lib/string/sprintf.h similarity index 100% rename from lib/sprintf.h rename to lib/string/sprintf.h diff --git a/lib/stpecpy.c b/lib/string/stpecpy.c similarity index 91% rename from lib/stpecpy.c rename to lib/string/stpecpy.c index faa02d695..97593884a 100644 --- a/lib/stpecpy.c +++ b/lib/string/stpecpy.c @@ -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); diff --git a/lib/stpecpy.h b/lib/string/stpecpy.h similarity index 100% rename from lib/stpecpy.h rename to lib/string/stpecpy.h diff --git a/lib/stpeprintf.c b/lib/string/stpeprintf.c similarity index 93% rename from lib/stpeprintf.c rename to lib/string/stpeprintf.c index f3238eafb..cecd95d7e 100644 --- a/lib/stpeprintf.c +++ b/lib/string/stpeprintf.c @@ -11,7 +11,7 @@ #ident "$Id$" -#include "stpeprintf.h" +#include "string/stpeprintf.h" #include diff --git a/lib/stpeprintf.h b/lib/string/stpeprintf.h similarity index 100% rename from lib/stpeprintf.h rename to lib/string/stpeprintf.h diff --git a/lib/strncpy.h b/lib/string/strncpy.h similarity index 100% rename from lib/strncpy.h rename to lib/string/strncpy.h diff --git a/lib/strtcpy.c b/lib/string/strtcpy.c similarity index 91% rename from lib/strtcpy.c rename to lib/string/strtcpy.c index 098004703..74de4fc4b 100644 --- a/lib/strtcpy.c +++ b/lib/string/strtcpy.c @@ -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, diff --git a/lib/strtcpy.h b/lib/string/strtcpy.h similarity index 100% rename from lib/strtcpy.h rename to lib/string/strtcpy.h diff --git a/lib/zustr2stp.c b/lib/string/zustr2stp.c similarity index 90% rename from lib/zustr2stp.c rename to lib/string/zustr2stp.c index 8dfe87057..e27ced3fb 100644 --- a/lib/zustr2stp.c +++ b/lib/string/zustr2stp.c @@ -10,7 +10,7 @@ #ident "$Id$" -#include "zustr2stp.h" +#include "string/zustr2stp.h" extern inline char *zustr2stp(char *restrict dst, const char *restrict src, diff --git a/lib/zustr2stp.h b/lib/string/zustr2stp.h similarity index 100% rename from lib/zustr2stp.h rename to lib/string/zustr2stp.h diff --git a/lib/utmp.c b/lib/utmp.c index bf878ce6b..dabe8b2e8 100644 --- a/lib/utmp.c +++ b/lib/utmp.c @@ -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$" diff --git a/src/chage.c b/src/chage.c index c3e457c97..025bdb18c 100644 --- a/src/chage.c +++ b/src/chage.c @@ -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 diff --git a/src/chfn.c b/src/chfn.c index 60e90c8aa..417ac35f1 100644 --- a/src/chfn.c +++ b/src/chfn.c @@ -32,7 +32,7 @@ /*@-exitarg@*/ #include "exitcodes.h" #include "shadowlog.h" -#include "strtcpy.h" +#include "string/strtcpy.h" /* * Global variables. diff --git a/src/chsh.c b/src/chsh.c index 3ae8b5108..32b3a4d8b 100644 --- a/src/chsh.c +++ b/src/chsh.c @@ -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" diff --git a/src/gpasswd.c b/src/gpasswd.c index e2aa0b13e..70002eb1d 100644 --- a/src/gpasswd.c +++ b/src/gpasswd.c @@ -35,7 +35,7 @@ /*@-exitarg@*/ #include "exitcodes.h" #include "shadowlog.h" -#include "strtcpy.h" +#include "string/strtcpy.h" /* * Global variables diff --git a/src/groupmod.c b/src/groupmod.c index 3c04cdbd3..084c5d561 100644 --- a/src/groupmod.c +++ b/src/groupmod.c @@ -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 */ diff --git a/src/login.c b/src/login.c index 11abe0639..d5ef87d8a 100644 --- a/src/login.c +++ b/src/login.c @@ -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" diff --git a/src/logoutd.c b/src/logoutd.c index 41458c3c2..11ccf05f6 100644 --- a/src/logoutd.c +++ b/src/logoutd.c @@ -20,7 +20,7 @@ #include "prototypes.h" #include "shadowlog.h" #include "sizeof.h" -#include "zustr2stp.h" +#include "string/zustr2stp.h" /* * Global variables */ diff --git a/src/passwd.c b/src/passwd.c index a4f493209..aef5b0512 100644 --- a/src/passwd.c +++ b/src/passwd.c @@ -32,7 +32,7 @@ #include "pwio.h" #include "shadowio.h" #include "shadowlog.h" -#include "strtcpy.h" +#include "string/strtcpy.h" /* * exit status values diff --git a/src/su.c b/src/su.c index af5f29aee..362841fb8 100644 --- 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 diff --git a/src/sulogin.c b/src/sulogin.c index eb99973f8..0bb9d900b 100644 --- a/src/sulogin.c +++ b/src/sulogin.c @@ -27,7 +27,7 @@ /*@-exitarg@*/ #include "exitcodes.h" #include "shadowlog.h" -#include "strtcpy.h" +#include "string/strtcpy.h" /* * Global variables diff --git a/src/useradd.c b/src/useradd.c index 8a5974822..062daeac0 100644 --- a/src/useradd.c +++ b/src/useradd.c @@ -63,7 +63,7 @@ #include "tcbfuncs.h" #endif #include "shadowlog.h" -#include "sprintf.h" +#include "string/sprintf.h" #ifndef SKEL_DIR diff --git a/src/userdel.c b/src/userdel.c index 14bbbd707..ce7ece229 100644 --- a/src/userdel.c +++ b/src/userdel.c @@ -52,7 +52,7 @@ #include "subordinateio.h" #endif /* ENABLE_SUBIDS */ #include "shadowlog.h" -#include "sprintf.h" +#include "string/sprintf.h" /* diff --git a/src/usermod.c b/src/usermod.c index d279981bb..06fe931cb 100644 --- a/src/usermod.c +++ b/src/usermod.c @@ -58,7 +58,7 @@ #include "tcbfuncs.h" #endif #include "shadowlog.h" -#include "sprintf.h" +#include "string/sprintf.h" /* diff --git a/src/vipw.c b/src/vipw.c index ab1c81164..50d28eb42 100644 --- a/src/vipw.c +++ b/src/vipw.c @@ -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 _( \ diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am index 3e3144ded..7416a1ded 100644 --- a/tests/unit/Makefile.am +++ b/tests/unit/Makefile.am @@ -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 = \ diff --git a/tests/unit/test_strncpy.c b/tests/unit/test_strncpy.c index f5b189ff7..968765bb1 100644 --- a/tests/unit/test_strncpy.c +++ b/tests/unit/test_strncpy.c @@ -15,7 +15,7 @@ #include #include "sizeof.h" -#include "strncpy.h" +#include "string/strncpy.h" static void test_STRNCPY_trunc(void **state); diff --git a/tests/unit/test_strtcpy.c b/tests/unit/test_strtcpy.c index 935a30cfb..12351a537 100644 --- a/tests/unit/test_strtcpy.c +++ b/tests/unit/test_strtcpy.c @@ -15,7 +15,7 @@ #include #include "sizeof.h" -#include "strtcpy.h" +#include "string/strtcpy.h" static void test_STRTCPY_trunc(void **state); diff --git a/tests/unit/test_xasprintf.c b/tests/unit/test_xasprintf.c index 25e36ca59..4b5d0935c 100644 --- a/tests/unit/test_xasprintf.c +++ b/tests/unit/test_xasprintf.c @@ -15,7 +15,7 @@ #include // Required by #include -#include "sprintf.h" +#include "string/sprintf.h" #define assert_unreachable() assert_true(0)