version 1.9, 2006/03/31 00:29:13 |
version 1.10, 2009/03/05 20:53:13 |
|
|
return (0); |
return (0); |
} |
} |
/* only admin can change from or to "restricted" shells */ |
/* only admin can change from or to "restricted" shells */ |
if (uid && pw->pw_shell && !ok_shell(pw->pw_shell)) { |
if (uid && pw->pw_shell && !ok_shell(pw->pw_shell, NULL)) { |
warnx("%s: current shell non-standard", pw->pw_shell); |
warnx("%s: current shell non-standard", pw->pw_shell); |
return (1); |
return (1); |
} |
} |
if (!(t = ok_shell(p))) { |
if (!ok_shell(p, &t)) { |
if (uid) { |
if (uid) { |
warnx("%s: non-standard shell", p); |
warnx("%s: non-standard shell", p); |
return (1); |
return (1); |
} |
} |
} else |
} |
p = t; |
if (!(pw->pw_shell = t)) { |
if (!(pw->pw_shell = strdup(p))) { |
|
warnx("can't save entry"); |
warnx("can't save entry"); |
return (1); |
return (1); |
} |
} |