]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/: Move memzero.[ch] under lib/string/memset/
authorAlejandro Colomar <alx@kernel.org>
Sun, 11 Aug 2024 23:53:45 +0000 (01:53 +0200)
committerSerge Hallyn <serge@hallyn.com>
Sat, 31 Aug 2024 02:44:07 +0000 (21:44 -0500)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
24 files changed:
lib/Makefile.am
lib/commonio.c
lib/failure.c
lib/groupmem.c
lib/limits.c
lib/log.c
lib/loginprompt.c
lib/obscure.c
lib/pam_pass_non_interactive.c
lib/pwauth.c
lib/pwmem.c
lib/sgroupio.c
lib/shadowmem.c
lib/string/memset/memzero.c [moved from lib/memzero.c with 52% similarity]
lib/string/memset/memzero.h [moved from lib/memzero.h with 69% similarity]
src/chage.c
src/faillog.c
src/gpasswd.c
src/groupadd.c
src/lastlog.c
src/login.c
src/passwd.c
src/useradd.c
src/usermod.c

index 4b02764d3c6110c8f7a0dd47ff085c7f41e19d12..89ccc0e35ba20b5cbad07018a019d63ef511f166 100644 (file)
@@ -124,8 +124,6 @@ libshadow_la_SOURCES = \
        lockpw.c \
        loginprompt.c \
        mail.c \
-       memzero.c \
-       memzero.h \
        motd.c \
        must_be.h \
        myname.c \
@@ -174,6 +172,8 @@ libshadow_la_SOURCES = \
        spawn.c \
        sssd.c \
        sssd.h \
+       string/memset/memzero.c \
+       string/memset/memzero.h \
        string/sprintf/snprintf.c \
        string/sprintf/snprintf.h \
        string/sprintf/stpeprintf.c \
index f7bad1329b68b87cc4bdf1a51d13a3afc7dacadd..5e4dc92d0f714f3059ba72b08c2fef9b7f0f51c4 100644 (file)
@@ -27,7 +27,6 @@
 #include "atoi/getnum.h"
 #include "commonio.h"
 #include "defines.h"
-#include "memzero.h"
 #include "nscd.h"
 #ifdef WITH_TCB
 #include <tcb.h>
@@ -35,6 +34,7 @@
 #include "prototypes.h"
 #include "shadowlog_internal.h"
 #include "sssd.h"
+#include "string/memset/memzero.h"
 #include "string/sprintf/snprintf.h"
 #include "string/strtok/stpsep.h"
 
index 298baf9d30a53ca42841f6fd16b278de2530f5a8..afff11aa6a675fecfbc9e25975081d379cb3614f 100644 (file)
@@ -18,8 +18,8 @@
 #include "defines.h"
 #include "faillog.h"
 #include "failure.h"
-#include "memzero.h"
 #include "prototypes.h"
+#include "string/memset/memzero.h"
 #include "string/strftime.h"
 #include "string/strcpy/strtcpy.h"
 
index b849ba562590701eeb2c7e2bedd3b5ebe4b32d01..b28fcbc2c973aecca61a08f6a871052d264c601d 100644 (file)
 
 #include "alloc/calloc.h"
 #include "alloc/malloc.h"
-#include "memzero.h"
 #include "prototypes.h"
 #include "defines.h"
 #include "groupio.h"
+#include "string/memset/memzero.h"
+
 
 /*@null@*/ /*@only@*/struct group *__gr_dup (const struct group *grent)
 {
index 9713a305bf06a6c531b4994bb2598de4a764c3b5..21c1635d5a9f6cf847efc290122b6a3f7cc1664f 100644 (file)
@@ -35,7 +35,7 @@
 #include "atoi/str2i/str2i.h"
 #include "atoi/str2i/str2s.h"
 #include "atoi/str2i/str2u.h"
-#include "memzero.h"
+#include "string/memset/memzero.h"
 #include "typetraits.h"
 
 
index e195a0f943c14c44d2cf82f3016064dca686c10c..87eab365e798d0585fae5611b8b77cb06389991a 100644 (file)
--- a/lib/log.c
+++ b/lib/log.c
@@ -17,8 +17,8 @@
 #include <time.h>
 #include "defines.h"
 #include <lastlog.h>
-#include "memzero.h"
 #include "prototypes.h"
+#include "string/memset/memzero.h"
 #include "string/strcpy/strncpy.h"
 #include "string/strcpy/strtcpy.h"
 
index 3d5f5eb3dc848a5f38bc18c26d76612414ad4175..95e9018b2deecc969f6945146d208e2c97aa5167 100644 (file)
@@ -18,8 +18,8 @@
 #include "attr.h"
 #include "defines.h"
 #include "getdef.h"
-#include "memzero.h"
 #include "prototypes.h"
+#include "string/memset/memzero.h"
 #include "string/strtok/stpsep.h"
 
 
index 74a32f0c3db3b301c7b0e909385a4326b23d6354..d10857bc54eaefb4b5de0b3ee7405f90101025f2 100644 (file)
 #include <stdio.h>
 
 #include "attr.h"
-#include "memzero.h"
 #include "prototypes.h"
 #include "defines.h"
 #include "getdef.h"
+#include "string/memset/memzero.h"
 #include "string/sprintf/xasprintf.h"
 #include "string/strdup/xstrdup.h"
 
index 072752630db5ebe28f8a639684e579b2ecf06826..2c0207b1e1e6d572fcbdd21af33e53154c9a27f8 100644 (file)
@@ -19,9 +19,9 @@
 
 #include "alloc/calloc.h"
 #include "attr.h"
-#include "memzero.h"
 #include "prototypes.h"
 #include "shadowlog.h"
+#include "string/memset/memzero.h"
 
 /*@null@*/ /*@only@*/static const char *non_interactive_password = NULL;
 static int ni_conv (int num_msg,
index bbc2d24197d60f7b02913186c7224e21d2ee48e2..0434dd08fd552a94fc1d470c211c5ed5ce684aaa 100644 (file)
 
 #include "agetpass.h"
 #include "defines.h"
-#include "memzero.h"
 #include "prototypes.h"
 #include "pwauth.h"
 #include "getdef.h"
+#include "string/memset/memzero.h"
 #include "string/sprintf/snprintf.h"
 
 #ifdef SKEY
index 16e07a2c9a71908cbfa993a7c8abba14cc463f1d..b68850e60e0b7af184cf05c9585f6dd41b5c08f3 100644 (file)
 
 #include "alloc/calloc.h"
 #include "defines.h"
-#include "memzero.h"
 #include "prototypes.h"
 #include "pwio.h"
+#include "string/memset/memzero.h"
+
 
 /*@null@*/ /*@only@*/struct passwd *__pw_dup (const struct passwd *pwent)
 {
index 08d30ba415cf18141c12a28e686ca8d0adb2ef5e..90a130111c57b87c2b8094b5c199e2bf16dba551 100644 (file)
@@ -20,8 +20,9 @@
 #include "defines.h"
 #include "commonio.h"
 #include "getdef.h"
-#include "memzero.h"
 #include "sgroupio.h"
+#include "string/memset/memzero.h"
+
 
 /*@null@*/ /*@only@*/struct sgrp *__sgr_dup (const struct sgrp *sgent)
 {
index 284cff65810aa44c5e9930c79753d74babb17794..e087ed5d7558be7ff942c9f116f691ca64ea85de 100644 (file)
@@ -18,8 +18,9 @@
 #include <stdio.h>
 
 #include "alloc/calloc.h"
-#include "memzero.h"
 #include "shadowio.h"
+#include "string/memset/memzero.h"
+
 
 /*@null@*/ /*@only@*/struct spwd *__spw_dup (const struct spwd *spent)
 {
similarity index 52%
rename from lib/memzero.c
rename to lib/string/memset/memzero.c
index 8979e5f835933dffaf411d436158f0aab98d2a56..74a384b354082283bad53d79a8005afa825dbef0 100644 (file)
@@ -1,7 +1,5 @@
-/*
- * SPDX-FileCopyrightText: 2023, Alejandro Colomar <alx@kernel.org>
- * SPDX-License-Identifier: BSD-3-Clause
- */
+// SPDX-FileCopyrightText: 2023, Alejandro Colomar <alx@kernel.org>
+// SPDX-License-Identifier: BSD-3-Clause
 
 
 #include <config.h>
@@ -10,7 +8,7 @@
 
 #include <stddef.h>
 
-#include "memzero.h"
+#include "string/memset/memzero.h"
 
 
 extern inline void memzero(void *ptr, size_t size);
similarity index 69%
rename from lib/memzero.h
rename to lib/string/memset/memzero.h
index 1137e830d3236bfb7b4435bce92e43861b0c1d8b..cbf082cac8e459033f71fdcd92d088547747daa8 100644 (file)
@@ -1,12 +1,10 @@
-/*
- * SPDX-FileCopyrightText: 2022-2023, Christian Göttsche <cgzones@googlemail.com>
- * SPDX-FileCopyrightText: 2023, Alejandro Colomar <alx@kernel.org>
- * SPDX-License-Identifier: BSD-3-Clause
- */
+// SPDX-FileCopyrightText: 2022-2023, Christian Göttsche <cgzones@googlemail.com>
+// SPDX-FileCopyrightText: 2023, Alejandro Colomar <alx@kernel.org>
+// SPDX-License-Identifier: BSD-3-Clause
 
 
-#ifndef SHADOW_INCLUDE_LIBMISC_MEMZERO_H_
-#define SHADOW_INCLUDE_LIBMISC_MEMZERO_H_
+#ifndef SHADOW_INCLUDE_LIB_STRING_MEMSET_MEMZERO_H_
+#define SHADOW_INCLUDE_LIB_STRING_MEMSET_MEMZERO_H_
 
 
 #include <config.h>
index f2df8dc76c140496968c47b1ca58a4f2d8ac4a53..409b54a0f60ee7b317df33bd8daa09320a9f4a17 100644 (file)
 
 #include "atoi/a2i/a2s.h"
 #include "defines.h"
-#include "memzero.h"
 #include "prototypes.h"
 #include "pwio.h"
 #include "shadowio.h"
 #include "shadowlog.h"
+#include "string/memset/memzero.h"
 #include "string/sprintf/snprintf.h"
 #include "string/strcpy/strtcpy.h"
 #include "string/strdup/xstrdup.h"
index cf02924998b98e69eb526beb6bddbcd7652adf31..709d741cef2ff932f019fbff44f117d6c0baf83a 100644 (file)
 #include "atoi/str2i/str2s.h"
 #include "defines.h"
 #include "faillog.h"
-#include "memzero.h"
 #include "prototypes.h"
 /*@-exitarg@*/
 #include "exitcodes.h"
 #include "shadowlog.h"
+#include "string/memset/memzero.h"
 #include "string/strftime.h"
 
 
index 92b83ea0be5a7bdd97a82323ea74439e3d459f45..b6b3d84f0cfb32984c8805d165e9d5fbc20567a7 100644 (file)
@@ -25,7 +25,6 @@
 #include "attr.h"
 #include "defines.h"
 #include "groupio.h"
-#include "memzero.h"
 #include "nscd.h"
 #include "sssd.h"
 #include "prototypes.h"
@@ -35,6 +34,7 @@
 /*@-exitarg@*/
 #include "exitcodes.h"
 #include "shadowlog.h"
+#include "string/memset/memzero.h"
 #include "string/sprintf/snprintf.h"
 #include "string/strcpy/strtcpy.h"
 #include "string/strdup/xstrdup.h"
index 1c15f6a45fcbc6f72b46b54c4e8df35546be6e17..6db991a8403b84fdb2dc46e23cd996daf9c07081 100644 (file)
@@ -29,7 +29,6 @@
 #include "defines.h"
 #include "getdef.h"
 #include "groupio.h"
-#include "memzero.h"
 #include "nscd.h"
 #include "sssd.h"
 #include "prototypes.h"
@@ -38,6 +37,7 @@
 #include "sgroupio.h"
 #endif
 #include "shadowlog.h"
+#include "string/memset/memzero.h"
 #include "string/strtok/stpsep.h"
 
 
index 085e70cd03ca7eb550a6175d87b9c75681c6c62e..3bd5c62fafaeddbcc82b7913a6970b4de831d5b2 100644 (file)
 #include "defines.h"
 #include "prototypes.h"
 #include "getdef.h"
-#include "memzero.h"
 /*@-exitarg@*/
 #include "exitcodes.h"
 #include "shadowlog.h"
+#include "string/memset/memzero.h"
 #include "string/strftime.h"
 
 
index cf1753e4235f60372c6684089fc78a2c2920a3b5..2319f50b39a02c8e1f64075702b836f2fd241c50 100644 (file)
 #include "faillog.h"
 #include "failure.h"
 #include "getdef.h"
-#include "memzero.h"
 #include "prototypes.h"
 #include "pwauth.h"
 /*@-exitarg@*/
 #include "exitcodes.h"
 #include "shadowlog.h"
+#include "string/memset/memzero.h"
 #include "string/sprintf/snprintf.h"
 #include "string/strcpy/strtcpy.h"
 #include "string/strdup/xstrdup.h"
index 7ec70fe12236eac8ee35c2916c60cc4a3718620f..8a46bc0d7e95b8586b584043ff73ec1e56355632 100644 (file)
@@ -24,7 +24,6 @@
 #include "atoi/a2i/a2s.h"
 #include "defines.h"
 #include "getdef.h"
-#include "memzero.h"
 #include "nscd.h"
 #include "sssd.h"
 #include "prototypes.h"
@@ -32,6 +31,7 @@
 #include "pwio.h"
 #include "shadowio.h"
 #include "shadowlog.h"
+#include "string/memset/memzero.h"
 #include "string/sprintf/xasprintf.h"
 #include "string/strcpy/strtcpy.h"
 #include "string/strdup/xstrdup.h"
index 2134ce9e10267bf7ac6f1e68039249934226115e..dff647af72eb0e04cafa447ffc8e2cad7d2e3dc9 100644 (file)
@@ -44,7 +44,6 @@
 #include "faillog.h"
 #include "getdef.h"
 #include "groupio.h"
-#include "memzero.h"
 #include "nscd.h"
 #include "sssd.h"
 #include "prototypes.h"
@@ -65,6 +64,7 @@
 #include "tcbfuncs.h"
 #endif
 #include "shadowlog.h"
+#include "string/memset/memzero.h"
 #include "string/sprintf/snprintf.h"
 #include "string/sprintf/xasprintf.h"
 #include "string/strdup/xstrdup.h"
index 7181d47f85bec03edb8dbbf626449c69aea7aabe..c5d7bbe51cd786fe4d3b799277591772f591c893 100644 (file)
@@ -42,7 +42,6 @@
 #include "faillog.h"
 #include "getdef.h"
 #include "groupio.h"
-#include "memzero.h"
 #include "must_be.h"
 #include "nscd.h"
 #include "sssd.h"
@@ -63,6 +62,7 @@
 #include "tcbfuncs.h"
 #endif
 #include "shadowlog.h"
+#include "string/memset/memzero.h"
 #include "string/sprintf/xasprintf.h"
 #include "string/strdup/xstrdup.h"
 #include "time/day_to_str.h"