Skip to content

Commit de785d5

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

File tree

6 files changed

+29
-18
lines changed

6 files changed

+29
-18
lines changed

lib/Makefile.am

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ libshadow_la_SOURCES = \
164164
semanage.c \
165165
setugid.c \
166166
setupenv.c \
167-
sgetspent.c \
168167
sgroupio.c \
169168
sgroupio.h \
170169
shadow/group/sgetgrent.c \
@@ -191,6 +190,8 @@ libshadow_la_SOURCES = \
191190
shadow/gshadow/sgrp.h \
192191
shadow/passwd/sgetpwent.c \
193192
shadow/passwd/sgetpwent.h \
193+
shadow/shadow/sgetspent.c \
194+
shadow/shadow/sgetspent.h \
194195
shadowio.c \
195196
shadowio.h \
196197
shadowlog.c \

lib/prototypes.h

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

400-
/* sgetspent.c */
401-
#ifndef HAVE_SGETSPENT
402-
extern struct spwd *sgetspent (const char *string);
403-
#endif
404-
405400
/* sgroupio.c */
406401
extern void __sgr_del_entry (const struct commonio_entry *ent);
407402
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 <stdlib.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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "fields.h"
1919
#include "getdef.h"
2020
#include "prototypes.h"
21+
#include "shadow/shadow/sgetspent.h"
2122
#include "shadowio.h"
2223

2324
#ifdef WITH_TCB

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/group/sgetgrent.c
6261
lib/shadow/passwd/sgetpwent.c

0 commit comments

Comments
 (0)