]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/shadow/, lib/, po/: sgetspent(): Move to under lib/shadow/shadow/
authorAlejandro Colomar <alx@kernel.org>
Mon, 24 Feb 2025 22:06:39 +0000 (23:06 +0100)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Tue, 7 Oct 2025 09:03:09 +0000 (11:03 +0200)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/Makefile.am
lib/prototypes.h
lib/shadow/shadow/sgetspent.c [moved from lib/sgetspent.c with 89% similarity]
lib/shadow/shadow/sgetspent.h [new file with mode: 0644]
lib/shadowio.c
po/POTFILES.in

index 25f08466515774e38a789fab889f535906caa6bc..31e9c0ee323e6e554ed52bcdb3a8a57300e0df35 100644 (file)
@@ -166,7 +166,6 @@ libshadow_la_SOURCES = \
        semanage.c \
        setugid.c \
        setupenv.c \
-       sgetspent.c \
        sgroupio.c \
        sgroupio.h \
        shadow/group/sgetgrent.c \
@@ -193,6 +192,8 @@ libshadow_la_SOURCES = \
        shadow/gshadow/sgrp.h \
        shadow/passwd/sgetpwent.c \
        shadow/passwd/sgetpwent.h \
+       shadow/shadow/sgetspent.c \
+       shadow/shadow/sgetspent.h \
        shadowio.c \
        shadowio.h \
        shadowlog.c \
index 92a2f759fb994d1c2230af719702fe86c9a9acdd..b5e18e52beffd8d9a5bc424332652874e7c76c7e 100644 (file)
@@ -397,11 +397,6 @@ extern void setup (struct passwd *);
 /* setupenv.c */
 extern void setup_env (struct passwd *);
 
-/* sgetspent.c */
-#ifndef HAVE_SGETSPENT
-extern struct spwd *sgetspent (const char *string);
-#endif
-
 /* sgroupio.c */
 extern void __sgr_del_entry (const struct commonio_entry *ent);
 extern /*@null@*/ /*@only@*/struct sgrp *__sgr_dup (const struct sgrp *sgent);
similarity index 89%
rename from lib/sgetspent.c
rename to lib/shadow/shadow/sgetspent.c
index 762e6c95829086e6aa786bb773fda552df3db090..5026ef99db5d66eeff44d39553211c7ab18f1c0c 100644 (file)
@@ -1,18 +1,16 @@
-/*
- * SPDX-FileCopyrightText: 1989 - 1994, Julianne Frances Haugh
- * SPDX-FileCopyrightText: 1996 - 1998, Marek Michałkiewicz
- * SPDX-FileCopyrightText: 2003 - 2005, Tomasz Kłoczko
- * SPDX-FileCopyrightText: 2009       , Nicolas François
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
+// SPDX-FileCopyrightText: 1989-1994, Julianne Frances Haugh
+// SPDX-FileCopyrightText: 1996-1998, Marek Michałkiewicz
+// SPDX-FileCopyrightText: 2003-2005, Tomasz Kłoczko
+// SPDX-FileCopyrightText: 2009, Nicolas François
+// SPDX-FileCopyrightText: 2025, Alejandro Colomar <alx@kernel.org>
+// SPDX-License-Identifier: BSD-3-Clause
+
 
 #include "config.h"
 
-/* Newer versions of Linux libc already have shadow support.  */
-#ifndef HAVE_SGETSPENT
+#include "shadow/shadow/sgetspent.h"
 
-#ident "$Id$"
+#ifndef HAVE_SGETSPENT
 
 #include <stddef.h>
 #include <stdio.h>
diff --git a/lib/shadow/shadow/sgetspent.h b/lib/shadow/shadow/sgetspent.h
new file mode 100644 (file)
index 0000000..4f88d08
--- /dev/null
@@ -0,0 +1,19 @@
+// SPDX-FileCopyrightText: 2025, Alejandro Colomar <alx@kernel.org>
+// SPDX-License-Identifier: BSD-3-Clause
+
+
+#ifndef SHADOW_INCLUDE_LIB_SHADOW_SHADOW_SGETSPENT_H_
+#define SHADOW_INCLUDE_LIB_SHADOW_SHADOW_SGETSPENT_H_
+
+
+#include "config.h"
+
+#include <shadow.h>
+
+
+#if !defined(HAVE_SGETSPENT)
+struct spwd *sgetspent(const char *s);
+#endif
+
+
+#endif  // include guard
index dbbaac2c95ea848082dddec16724b95230d06a8d..9fe5d097f1b18fe21ee10f7999742b826fd5a3df 100644 (file)
@@ -18,6 +18,7 @@
 #include "fields.h"
 #include "getdef.h"
 #include "prototypes.h"
+#include "shadow/shadow/sgetspent.h"
 #include "shadowio.h"
 
 #ifdef WITH_TCB
index 1da1ae19bd58f71fe3d34a3a17895169da0d7c7f..376dec4e185e916b43ac3da32de8b7a48f9eba47 100644 (file)
@@ -56,7 +56,6 @@ lib/selinux.c
 lib/semanage.c
 lib/setugid.c
 lib/setupenv.c
-lib/sgetspent.c
 lib/sgroupio.c
 lib/shadow/group/sgetgrent.c
 lib/shadow/passwd/sgetpwent.c