Skip to content

Commit 039ece7

Browse files
lib/shadow/shadow/, lib/, po/: sgetspent(): Move to under lib/shadow/shadow/
Signed-off-by: Alejandro Colomar <[email protected]>
1 parent 87f20fc commit 039ece7

File tree

6 files changed

+32
-20
lines changed

6 files changed

+32
-20
lines changed

lib/Makefile.am

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ libshadow_la_SOURCES = \
166166
semanage.c \
167167
setugid.c \
168168
setupenv.c \
169-
sgetspent.c \
170169
sgroupio.c \
171170
sgroupio.h \
172171
shadow.c \
@@ -194,6 +193,8 @@ libshadow_la_SOURCES = \
194193
shadow/gshadow/sgrp.h \
195194
shadow/passwd/sgetpwent.c \
196195
shadow/passwd/sgetpwent.h \
196+
shadow/shadow/sgetspent.c \
197+
shadow/shadow/sgetspent.h \
197198
shadowio.c \
198199
shadowio.h \
199200
shadowlog.c \

lib/prototypes.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -401,11 +401,6 @@ extern void setup (struct passwd *);
401401
/* setupenv.c */
402402
extern void setup_env (struct passwd *);
403403

404-
/* sgetspent.c */
405-
#ifndef HAVE_SGETSPENT
406-
extern struct spwd *sgetspent (const char *string);
407-
#endif
408-
409404
/* sgroupio.c */
410405
extern void __sgr_del_entry (const struct commonio_entry *ent);
411406
extern /*@null@*/ /*@only@*/struct sgrp *__sgr_dup (const struct sgrp *sgent);

lib/sgetspent.c renamed to lib/shadow/shadow/sgetspent.c

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
1-
/*
2-
* SPDX-FileCopyrightText: 1989 - 1994, Julianne Frances Haugh
3-
* SPDX-FileCopyrightText: 1996 - 1998, Marek Michałkiewicz
4-
* SPDX-FileCopyrightText: 2003 - 2005, Tomasz Kłoczko
5-
* SPDX-FileCopyrightText: 2009 , Nicolas François
6-
*
7-
* SPDX-License-Identifier: BSD-3-Clause
8-
*/
1+
// SPDX-FileCopyrightText: 1989-1994, Julianne Frances Haugh
2+
// SPDX-FileCopyrightText: 1996-1998, Marek Michałkiewicz
3+
// SPDX-FileCopyrightText: 2003-2005, Tomasz Kłoczko
4+
// SPDX-FileCopyrightText: 2009, Nicolas François
5+
// SPDX-FileCopyrightText: 2025, Alejandro Colomar <[email protected]>
6+
// SPDX-License-Identifier: BSD-3-Clause
7+
98

109
#include <config.h>
1110

12-
/* Newer versions of Linux libc already have shadow support. */
1311
#ifndef HAVE_SGETSPENT
1412

15-
#ident "$Id$"
16-
1713
#include <stddef.h>
1814
#include <stdio.h>
1915
#include <sys/types.h>

lib/shadow/shadow/sgetspent.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// SPDX-FileCopyrightText: 2025, Alejandro Colomar <[email protected]>
2+
// SPDX-License-Identifier: BSD-3-Clause
3+
4+
5+
#ifndef SHADOW_INCLUDE_LIB_SHADOW_SHADOW_SGETSPENT_H_
6+
#define SHADOW_INCLUDE_LIB_SHADOW_SHADOW_SGETSPENT_H_
7+
8+
9+
#include <config.h>
10+
11+
#include <shadow.h>
12+
13+
14+
#if !defined(HAVE_SGETSPENT)
15+
struct spwd *sgetspent(const char *s);
16+
#endif
17+
18+
19+
#endif // include guard

lib/shadowio.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212

1313
#ident "$Id$"
1414

15-
#include "prototypes.h"
16-
#include "defines.h"
1715
#include <shadow.h>
1816
#include <stdio.h>
17+
1918
#include "commonio.h"
19+
#include "defines.h"
2020
#include "getdef.h"
21+
#include "prototypes.h"
22+
#include "shadow/shadow/sgetspent.h"
2123
#include "shadowio.h"
2224
#ifdef WITH_TCB
2325
#include <tcb.h>

po/POTFILES.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ lib/selinux.c
5656
lib/semanage.c
5757
lib/setugid.c
5858
lib/setupenv.c
59-
lib/sgetspent.c
6059
lib/sgroupio.c
6160
lib/shadow.c
6261
lib/shadow/group/sgetgrent.c

0 commit comments

Comments
 (0)