Deleted Added
full compact
pw_conf.c (30259) pw_conf.c (44229)
1/*-
2 * Copyright (C) 1996
3 * David L. Nugent. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#ifndef lint
28static const char rcsid[] =
1/*-
2 * Copyright (C) 1996
3 * David L. Nugent. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#ifndef lint
28static const char rcsid[] =
29 "$Id$";
29 "$Id: pw_conf.c,v 1.7 1997/10/10 06:23:36 charnier Exp $";
30#endif /* not lint */
31
32#include <string.h>
33#include <ctype.h>
34#include <fcntl.h>
35
36#include "pw.h"
30#endif /* not lint */
31
32#include <string.h>
33#include <ctype.h>
34#include <fcntl.h>
35
36#include "pw.h"
37#include "pwupd.h"
38
39#define debugging 0
40
41enum {
42 _UC_NONE,
43 _UC_DEFAULTPWD,
44 _UC_REUSEUID,
45 _UC_REUSEGID,

--- 259 unchanged lines hidden (view full) ---

305 system_shells[i++] = NULL;
306 break;
307 case _UC_DEFAULTSHELL:
308 config.shell_default = (q == NULL || !boolean_val(q, 1))
309 ? (char *) bourne_shell : newstr(q);
310 break;
311 case _UC_DEFAULTGROUP:
312 q = unquote(q);
37
38#define debugging 0
39
40enum {
41 _UC_NONE,
42 _UC_DEFAULTPWD,
43 _UC_REUSEUID,
44 _UC_REUSEGID,

--- 259 unchanged lines hidden (view full) ---

304 system_shells[i++] = NULL;
305 break;
306 case _UC_DEFAULTSHELL:
307 config.shell_default = (q == NULL || !boolean_val(q, 1))
308 ? (char *) bourne_shell : newstr(q);
309 break;
310 case _UC_DEFAULTGROUP:
311 q = unquote(q);
313 config.default_group = (q == NULL || !boolean_val(q, 1) || getgrnam(q) == NULL)
312 config.default_group = (q == NULL || !boolean_val(q, 1) || GETGRNAM(q) == NULL)
314 ? NULL : newstr(q);
315 break;
316 case _UC_EXTRAGROUPS:
317 for (i = 0; q != NULL; q = strtok(NULL, toks)) {
318 if (extendarray(&config.groups, &config.numgroups, i + 2) != -1)
319 config.groups[i++] = newstr(q);
320 }
321 if (i > 0)

--- 175 unchanged lines hidden ---
313 ? NULL : newstr(q);
314 break;
315 case _UC_EXTRAGROUPS:
316 for (i = 0; q != NULL; q = strtok(NULL, toks)) {
317 if (extendarray(&config.groups, &config.numgroups, i + 2) != -1)
318 config.groups[i++] = newstr(q);
319 }
320 if (i > 0)

--- 175 unchanged lines hidden ---