]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/shadow/, lib/, po/: sgetgrent(): Move to under lib/shadow/group/
authorAlejandro Colomar <alx@kernel.org>
Sun, 10 Nov 2024 22:14:28 +0000 (23:14 +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/groupio.c
lib/prototypes.h
lib/shadow/group/sgetgrent.c [moved from lib/sgetgrent.c with 78% similarity]
lib/shadow/group/sgetgrent.h [new file with mode: 0644]
po/POTFILES.in

index d5ec99a0787cf83bd4c498b14bb9ebdee08460ab..25c915b507c14b34cf9fcea196b3697dd4bcbe00 100644 (file)
@@ -166,11 +166,12 @@ libshadow_la_SOURCES = \
        semanage.c \
        setugid.c \
        setupenv.c \
-       sgetgrent.c \
        sgetpwent.c \
        sgetspent.c \
        sgroupio.c \
        sgroupio.h \
+       shadow/group/sgetgrent.c \
+       shadow/group/sgetgrent.h \
        shadow/grp/agetgroups.c \
        shadow/grp/agetgroups.h \
        shadow/gshadow/endsgent.c \
index ac1a5d637f63437d1a156948428d4de73d1099de..0af395a957ad01bd9dc704b9ee2faee4c49f57f7 100644 (file)
@@ -23,6 +23,7 @@
 #include "getdef.h"
 #include "groupio.h"
 #include "prototypes.h"
+#include "shadow/group/sgetgrent.h"
 #include "string/sprintf/aprintf.h"
 #include "string/strcmp/streq.h"
 
index d8a88e372be0102cf4d687f78d5a27aa6c0c7e67..2d20395edc7d50ef4f0dc9cf8ed1d420024ffbaf 100644 (file)
@@ -397,9 +397,6 @@ extern void setup (struct passwd *);
 /* setupenv.c */
 extern void setup_env (struct passwd *);
 
-/* sgetgrent.c */
-extern struct group *sgetgrent (const char *buf);
-
 /* sgetpwent.c */
 extern struct passwd *sgetpwent (const char *buf);
 
similarity index 78%
rename from lib/sgetgrent.c
rename to lib/shadow/group/sgetgrent.c
index f2f3f838b0a55042483d90fa5c378a69b75a67f9..744a8f5cbc8b153955e6393df378a8b29e63aaa7 100644 (file)
@@ -1,15 +1,14 @@
-/*
- * SPDX-FileCopyrightText: 1990 - 1994, Julianne Frances Haugh
- * SPDX-FileCopyrightText: 1996 - 1998, Marek Michałkiewicz
- * SPDX-FileCopyrightText: 2005       , Tomasz Kłoczko
- * SPDX-FileCopyrightText: 2008       , Nicolas François
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
+// SPDX-FileCopyrightText: 1990-1994, Julianne Frances Haugh
+// SPDX-FileCopyrightText: 1996-1998, Marek Michałkiewicz
+// SPDX-FileCopyrightText: 2005, Tomasz Kłoczko
+// SPDX-FileCopyrightText: 2008, Nicolas François
+// SPDX-FileCopyrightText: 2024, Alejandro Colomar <alx@kernel.org>
+// SPDX-License-Identifier: BSD-3-Clause
+
 
 #include "config.h"
 
-#ident "$Id$"
+#include "shadow/group/sgetgrent.h"
 
 #include <grp.h>
 #include <stdio.h>
@@ -56,6 +55,7 @@ list(char *s)
 }
 
 
+// from-string get group entry
 struct group *
 sgetgrent(const char *s)
 {
diff --git a/lib/shadow/group/sgetgrent.h b/lib/shadow/group/sgetgrent.h
new file mode 100644 (file)
index 0000000..fcf0166
--- /dev/null
@@ -0,0 +1,17 @@
+// SPDX-FileCopyrightText: 2024, Alejandro Colomar <alx@kernel.org>
+// SPDX-License-Identifier: BSD-3-Clause
+
+
+#ifndef SHADOW_INCLUDE_LIB_SHADOW_GROUP_SGETGRENT_H_
+#define SHADOW_INCLUDE_LIB_SHADOW_GROUP_SGETGRENT_H_
+
+
+#include "config.h"
+
+#include <grp.h>
+
+
+struct group *sgetgrent(const char *s);
+
+
+#endif  // include guard
index 614415c23d6a56bcaa0d75c2a28cb1e243b01b5e..af5cfa5dfdb7c1a9c1e5cc043d48a535af7d8b47 100644 (file)
@@ -56,10 +56,10 @@ lib/selinux.c
 lib/semanage.c
 lib/setugid.c
 lib/setupenv.c
-lib/sgetgrent.c
 lib/sgetpwent.c
 lib/sgetspent.c
 lib/sgroupio.c
+lib/shadow/group/sgetgrent.c
 lib/shadowio.c
 lib/shadowmem.c
 lib/shell.c