Deleted Added
full compact
user.c (59089) user.c (79304)
1/*
1/*
2 * $FreeBSD: head/usr.sbin/sysinstall/user.c 59089 2000-04-08 03:08:12Z murray $
2 * $FreeBSD: head/usr.sbin/sysinstall/user.c 79304 2001-07-05 09:51:09Z kris $
3 *
4 * Copyright (c) 1996
5 * J�rg Wunsch. All rights reserved.
6 *
7 * The basic structure has been taken from tcpip.c, which is:
8 *
9 * Copyright (c) 1995
10 * Gary J Palmer. All rights reserved.

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

166 char tmp[256], *cp;
167 long lgid;
168
169 if (strlen(gname) == 0) {
170 feepout("The group name field must not be empty!");
171 return 0;
172 }
173 snprintf(tmp, 256, "pw group show -q -n %s > /dev/null", gname);
3 *
4 * Copyright (c) 1996
5 * J�rg Wunsch. All rights reserved.
6 *
7 * The basic structure has been taken from tcpip.c, which is:
8 *
9 * Copyright (c) 1995
10 * Gary J Palmer. All rights reserved.

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

166 char tmp[256], *cp;
167 long lgid;
168
169 if (strlen(gname) == 0) {
170 feepout("The group name field must not be empty!");
171 return 0;
172 }
173 snprintf(tmp, 256, "pw group show -q -n %s > /dev/null", gname);
174 if (vsystem(tmp) == 0) {
174 if (vsystem("%s", tmp) == 0) {
175 feepout("This group name is already in use.");
176 return 0;
177 }
178 if (strlen(gid) > 0) {
179 lgid = strtol(gid, &cp, 10);
180 if (lgid < 0 || lgid >= 65536 || (*cp != '\0' && !isspace(*cp))) {
181 feepout("The GID must be a number between 1 and 65535.");
182 return 0;

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

405 WINDOW *save;
406 int rv;
407
408 if (strlen(uname) == 0) {
409 feepout("The user name field must not be empty!");
410 return 0;
411 }
412 snprintf(tmp, 256, "pw user show -q -n %s > /dev/null", uname);
175 feepout("This group name is already in use.");
176 return 0;
177 }
178 if (strlen(gid) > 0) {
179 lgid = strtol(gid, &cp, 10);
180 if (lgid < 0 || lgid >= 65536 || (*cp != '\0' && !isspace(*cp))) {
181 feepout("The GID must be a number between 1 and 65535.");
182 return 0;

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

405 WINDOW *save;
406 int rv;
407
408 if (strlen(uname) == 0) {
409 feepout("The user name field must not be empty!");
410 return 0;
411 }
412 snprintf(tmp, 256, "pw user show -q -n %s > /dev/null", uname);
413 if (vsystem(tmp) == 0) {
413 if (vsystem("%s", tmp) == 0) {
414 feepout("This user name is already in use.");
415 return 0;
416 }
417 if (strlen(uid) > 0) {
418 luid = strtol(uid, &cp, 10);
419 if (luid < 0 || luid >= 65536 || (*cp != '\0' && !isspace(*cp))) {
420 feepout("The UID must be a number between 1 and 65535.");
421 return 0;

--- 320 unchanged lines hidden ---
414 feepout("This user name is already in use.");
415 return 0;
416 }
417 if (strlen(uid) > 0) {
418 luid = strtol(uid, &cp, 10);
419 if (luid < 0 || luid >= 65536 || (*cp != '\0' && !isspace(*cp))) {
420 feepout("The UID must be a number between 1 and 65535.");
421 return 0;

--- 320 unchanged lines hidden ---