From: Alejandro Colomar Date: Mon, 24 Feb 2025 22:06:39 +0000 (+0100) Subject: lib/shadow/, lib/, po/: sgetspent(): Move to under lib/shadow/shadow/ X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5c872e3424edc82fcf40b8d35138530ac6b860ff;p=thirdparty%2Fshadow.git lib/shadow/, lib/, po/: sgetspent(): Move to under lib/shadow/shadow/ Signed-off-by: Alejandro Colomar --- diff --git a/lib/Makefile.am b/lib/Makefile.am index 25f084665..31e9c0ee3 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -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 \ diff --git a/lib/prototypes.h b/lib/prototypes.h index 92a2f759f..b5e18e52b 100644 --- a/lib/prototypes.h +++ b/lib/prototypes.h @@ -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); diff --git a/lib/sgetspent.c b/lib/shadow/shadow/sgetspent.c similarity index 89% rename from lib/sgetspent.c rename to lib/shadow/shadow/sgetspent.c index 762e6c958..5026ef99d 100644 --- a/lib/sgetspent.c +++ b/lib/shadow/shadow/sgetspent.c @@ -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 +// 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 #include diff --git a/lib/shadow/shadow/sgetspent.h b/lib/shadow/shadow/sgetspent.h new file mode 100644 index 000000000..4f88d08a6 --- /dev/null +++ b/lib/shadow/shadow/sgetspent.h @@ -0,0 +1,19 @@ +// SPDX-FileCopyrightText: 2025, Alejandro Colomar +// 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 + + +#if !defined(HAVE_SGETSPENT) +struct spwd *sgetspent(const char *s); +#endif + + +#endif // include guard diff --git a/lib/shadowio.c b/lib/shadowio.c index dbbaac2c9..9fe5d097f 100644 --- a/lib/shadowio.c +++ b/lib/shadowio.c @@ -18,6 +18,7 @@ #include "fields.h" #include "getdef.h" #include "prototypes.h" +#include "shadow/shadow/sgetspent.h" #include "shadowio.h" #ifdef WITH_TCB diff --git a/po/POTFILES.in b/po/POTFILES.in index 1da1ae19b..376dec4e1 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -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