File tree Expand file tree Collapse file tree 6 files changed +33
-16
lines changed Expand file tree Collapse file tree 6 files changed +33
-16
lines changed Original file line number Diff line number Diff line change @@ -166,12 +166,13 @@ libshadow_la_SOURCES = \
166
166
semanage.c \
167
167
setugid.c \
168
168
setupenv.c \
169
- sgetgrent.c \
170
169
sgetpwent.c \
171
170
sgetspent.c \
172
171
sgroupio.c \
173
172
sgroupio.h \
174
173
shadow.c \
174
+ shadow/group/sgetgrent.c \
175
+ shadow/group/sgetgrent.h \
175
176
shadow/grp/agetgroups.c \
176
177
shadow/grp/agetgroups.h \
177
178
shadow/gshadow/endsgent.c \
Original file line number Diff line number Diff line change 22
22
#include "getdef.h"
23
23
#include "groupio.h"
24
24
#include "prototypes.h"
25
+ #include "shadow/group/sgetgrent.h"
25
26
#include "string/strcmp/streq.h"
26
27
27
28
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
- /* sgetgrent.c */
402
- extern struct group * sgetgrent (const char * buf );
403
-
404
401
/* sgetpwent.c */
405
402
extern struct passwd * sgetpwent (const char * buf );
406
403
Original file line number Diff line number Diff line change 1
- /*
2
- * SPDX-FileCopyrightText: 1990 - 1994, Julianne Frances Haugh
3
- * SPDX-FileCopyrightText: 1996 - 1998, Marek Michałkiewicz
4
- * SPDX-FileCopyrightText: 2005 , Tomasz Kłoczko
5
- * SPDX-FileCopyrightText: 2008 , Nicolas François
6
- *
7
- * SPDX-License-Identifier: BSD-3-Clause
8
- */
1
+ // SPDX-FileCopyrightText: 1990-1994, Julianne Frances Haugh
2
+ // SPDX-FileCopyrightText: 1996-1998, Marek Michałkiewicz
3
+ // SPDX-FileCopyrightText: 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/group/sgetgrent.h "
13
12
14
13
#include <stdio.h>
15
14
#include <sys/types.h>
27
26
28
27
#define NFIELDS 4
29
28
29
+
30
30
/*
31
31
* list - turn a comma-separated string into an array of (char *)'s
32
32
*
@@ -64,7 +64,9 @@ list(char *s)
64
64
}
65
65
66
66
67
- struct group * sgetgrent (const char * buf )
67
+ // from-string get group entry
68
+ struct group *
69
+ sgetgrent (const char * buf )
68
70
{
69
71
static char * grpbuf = NULL ;
70
72
static size_t size = 0 ;
@@ -105,4 +107,3 @@ struct group *sgetgrent (const char *buf)
105
107
106
108
return & grent ;
107
109
}
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_GROUP_SGETGRENT_H_
6
+ #define SHADOW_INCLUDE_LIB_SHADOW_GROUP_SGETGRENT_H_
7
+
8
+
9
+ #include <config.h>
10
+
11
+ #include <grp.h>
12
+
13
+
14
+ struct group * sgetgrent (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/sgetgrent.c
60
59
lib/sgetpwent.c
61
60
lib/sgetspent.c
62
61
lib/sgroupio.c
63
62
lib/shadow.c
63
+ lib/shadow/group/sgetgrent.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