Deleted Added
full compact
pw_user.c (322919) pw_user.c (323009)
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

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

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
28#ifndef lint
29static 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

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

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
28#ifndef lint
29static const char rcsid[] =
30 "$FreeBSD: stable/11/usr.sbin/pw/pw_user.c 322919 2017-08-26 00:35:49Z emaste $";
30 "$FreeBSD: stable/11/usr.sbin/pw/pw_user.c 323009 2017-08-30 01:15:05Z emaste $";
31#endif /* not lint */
32
33#include <sys/param.h>
34#include <sys/types.h>
35
36#include <assert.h>
37#include <ctype.h>
38#include <dirent.h>

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

1197
1198 if ((cmdcnf = calloc(1, sizeof(struct userconf))) == NULL)
1199 err(EXIT_FAILURE, "calloc()");
1200
1201 if (arg1 != NULL) {
1202 if (arg1[strspn(arg1, "0123456789")] == '\0')
1203 id = pw_checkid(arg1, UID_MAX);
1204 else
31#endif /* not lint */
32
33#include <sys/param.h>
34#include <sys/types.h>
35
36#include <assert.h>
37#include <ctype.h>
38#include <dirent.h>

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

1197
1198 if ((cmdcnf = calloc(1, sizeof(struct userconf))) == NULL)
1199 err(EXIT_FAILURE, "calloc()");
1200
1201 if (arg1 != NULL) {
1202 if (arg1[strspn(arg1, "0123456789")] == '\0')
1203 id = pw_checkid(arg1, UID_MAX);
1204 else
1205 name = arg1;
1205 name = pw_checkname(arg1, 0);
1206 }
1207
1208 while ((ch = getopt(argc, argv, args)) != -1) {
1209 switch (ch) {
1210 case 'C':
1211 cfg = optarg;
1212 break;
1213 case 'q':
1214 quiet = true;
1215 break;
1216 case 'n':
1206 }
1207
1208 while ((ch = getopt(argc, argv, args)) != -1) {
1209 switch (ch) {
1210 case 'C':
1211 cfg = optarg;
1212 break;
1213 case 'q':
1214 quiet = true;
1215 break;
1216 case 'n':
1217 name = optarg;
1217 name = pw_checkname(optarg, 0);
1218 break;
1219 case 'u':
1220 userid = optarg;
1221 break;
1222 case 'c':
1223 gecos = pw_checkname(optarg, 1);
1224 break;
1225 case 'd':

--- 593 unchanged lines hidden ---
1218 break;
1219 case 'u':
1220 userid = optarg;
1221 break;
1222 case 'c':
1223 gecos = pw_checkname(optarg, 1);
1224 break;
1225 case 'd':

--- 593 unchanged lines hidden ---