File tree Expand file tree Collapse file tree 6 files changed +32
-15
lines changed Expand file tree Collapse file tree 6 files changed +32
-15
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,6 @@ libshadow_la_SOURCES = \
166
166
semanage.c \
167
167
setugid.c \
168
168
setupenv.c \
169
- sgetpwent.c \
170
169
sgetspent.c \
171
170
sgroupio.c \
172
171
sgroupio.h \
@@ -193,6 +192,8 @@ libshadow_la_SOURCES = \
193
192
shadow/gshadow/sgetsgent.h \
194
193
shadow/gshadow/sgrp.c \
195
194
shadow/gshadow/sgrp.h \
195
+ shadow/passwd/sgetpwent.c \
196
+ shadow/passwd/sgetpwent.h \
196
197
shadowio.c \
197
198
shadowio.h \
198
199
shadowlog.c \
Original file line number Diff line number Diff line change @@ -398,9 +398,6 @@ extern void setup (struct passwd *);
398
398
/* setupenv.c */
399
399
extern void setup_env (struct passwd * );
400
400
401
- /* sgetpwent.c */
402
- extern struct passwd * sgetpwent (const char * buf );
403
-
404
401
/* sgetspent.c */
405
402
#ifndef HAVE_SGETSPENT
406
403
extern struct spwd * sgetspent (const char * string );
Original file line number Diff line number Diff line change 18
18
#include <stdio.h>
19
19
#include "commonio.h"
20
20
#include "pwio.h"
21
+ #include "shadow/passwd/sgetpwent.h"
22
+
21
23
22
24
static /*@null@*/ /*@only@*/ void * passwd_dup (const void * ent )
23
25
{
Original file line number Diff line number Diff line change 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: 2008 , 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: 2008, Nicolas François
5
+ // SPDX-FileCopyrightText: 2024, Alejandro Colomar <[email protected] >
6
+ // SPDX-License-Identifier: BSD-3-Clause
7
+
9
8
10
9
#include <config.h>
11
10
12
- #ident "$Id$ "
11
+ #include "shadow/passwd/sgetpwent.h "
13
12
14
13
#include <sys/types.h>
15
14
#include <stdio.h>
25
24
26
25
#define NFIELDS 7
27
26
27
+
28
28
/*
29
29
* sgetpwent - convert a string to a (struct passwd)
30
30
*
37
37
* performance reasons. I am going to come up with some conditional
38
38
* compilation glarp to improve on this in the future.
39
39
*/
40
+ // from-string get pasword entry
40
41
struct passwd *
41
42
sgetpwent (const char * buf )
42
43
{
@@ -105,4 +106,3 @@ sgetpwent(const char *buf)
105
106
106
107
return & pwent ;
107
108
}
108
-
Original file line number Diff line number Diff line change
1
+ // SPDX-FileCopyrightText: 2024, Alejandro Colomar <[email protected] >
2
+ // SPDX-License-Identifier: BSD-3-Clause
3
+
4
+
5
+ #ifndef SHADOW_INCLUDE_LIB_SHADOW_PASSWD_SGETPWENT_H_
6
+ #define SHADOW_INCLUDE_LIB_SHADOW_PASSWD_SGETPWENT_H_
7
+
8
+
9
+ #include <config.h>
10
+
11
+ #include <pwd.h>
12
+
13
+
14
+ struct passwd * sgetpwent (const char * s );
15
+
16
+
17
+ #endif // include guard
Original file line number Diff line number Diff line change @@ -56,11 +56,11 @@ lib/selinux.c
56
56
lib/semanage.c
57
57
lib/setugid.c
58
58
lib/setupenv.c
59
- lib/sgetpwent.c
60
59
lib/sgetspent.c
61
60
lib/sgroupio.c
62
61
lib/shadow.c
63
62
lib/shadow/group/sgetgrent.c
63
+ lib/shadow/passwd/sgetpwent.c
64
64
lib/shadowio.c
65
65
lib/shadowmem.c
66
66
lib/shell.c
You can’t perform that action at this time.
0 commit comments