semanage.c \
setugid.c \
setupenv.c \
- sgetpwent.c \
sgetspent.c \
sgroupio.c \
sgroupio.h \
shadow/gshadow/sgetsgent.h \
shadow/gshadow/sgrp.c \
shadow/gshadow/sgrp.h \
+ shadow/passwd/sgetpwent.c \
+ shadow/passwd/sgetpwent.h \
shadowio.c \
shadowio.h \
shadowlog.c \
/* setupenv.c */
extern void setup_env (struct passwd *);
-/* sgetpwent.c */
-extern struct passwd *sgetpwent (const char *buf);
-
/* sgetspent.c */
#ifndef HAVE_SGETSPENT
extern struct spwd *sgetspent (const char *string);
-/*
- * SPDX-FileCopyrightText: 1989 - 1994, Julianne Frances Haugh
- * SPDX-FileCopyrightText: 1996 - 1998, Marek Michałkiewicz
- * SPDX-FileCopyrightText: 2003 - 2005, Tomasz Kłoczko
- * SPDX-FileCopyrightText: 2008 , 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: 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/passwd/sgetpwent.h"
#include <pwd.h>
#include <stdio.h>
* performance reasons. I am going to come up with some conditional
* compilation glarp to improve on this in the future.
*/
+// from-string get pasword entry
struct passwd *
sgetpwent(const char *s)
{
return &pwent;
}
-
--- /dev/null
+// SPDX-FileCopyrightText: 2024, Alejandro Colomar <alx@kernel.org>
+// SPDX-License-Identifier: BSD-3-Clause
+
+
+#ifndef SHADOW_INCLUDE_LIB_SHADOW_PASSWD_SGETPWENT_H_
+#define SHADOW_INCLUDE_LIB_SHADOW_PASSWD_SGETPWENT_H_
+
+
+#include "config.h"
+
+#include <pwd.h>
+
+
+struct passwd *sgetpwent(const char *s);
+
+
+#endif // include guard