version 1.32, 2005/12/12 20:43:10 |
version 1.33, 2007/01/15 08:14:21 |
|
|
int |
int |
main(int argc, char *argv[]) |
main(int argc, char *argv[]) |
{ |
{ |
struct passwd *pw = NULL, *opw, lpw; |
struct passwd *pw = NULL, *opw = NULL, lpw; |
int i, ch, pfd, tfd, dfd; |
int i, ch, pfd, tfd, dfd; |
char *arg = NULL; |
char *arg = NULL; |
sigset_t fullset; |
sigset_t fullset; |
|
|
} |
} |
|
|
if (op == LOADENTRY) { |
if (op == LOADENTRY) { |
|
if (argc != 0) |
|
errx(1, "option -a does not accept user argument"); |
if (uid) |
if (uid) |
baduser(); |
baduser(); |
pw = &lpw; |
pw = &lpw; |
if (!pw_scan(arg, pw, NULL)) |
if (!pw_scan(arg, pw, NULL)) |
exit(1); |
exit(1); |
|
opw = getpwnam(pw->pw_name); |
} |
} |
if ((opw = pw_dup(pw)) == NULL) |
if (opw == NULL && (opw = pw_dup(pw)) == NULL) |
err(1, NULL); |
err(1, NULL); |
|
|
/* Edit the user passwd information if requested. */ |
/* Edit the user passwd information if requested. */ |