Blame util-linux-2.11y-chsh-103004.patch
|
cvsdist |
55e217f |
--- util-linux-2.11y/login-utils/chsh.c.sopwith Fri Sep 5 08:51:49 2003
|
|
cvsdist |
55e217f |
+++ util-linux-2.11y/login-utils/chsh.c Fri Sep 5 08:53:43 2003
|
|
cvsdist |
55e217f |
@@ -185,7 +185,6 @@
|
|
cvsdist |
55e217f |
printf (_("Shell not changed.\n"));
|
|
cvsdist |
55e217f |
return 0;
|
|
cvsdist |
55e217f |
}
|
|
cvsdist |
55e217f |
- if (!strcmp(shell, "/bin/sh")) shell = "";
|
|
cvsdist |
55e217f |
pw->pw_shell = shell;
|
|
cvsdist |
55e217f |
if (setpwnam (pw) < 0) {
|
|
cvsdist |
55e217f |
perror ("setpwnam");
|
|
cvsdist |
55e217f |
@@ -299,6 +298,8 @@
|
|
cvsdist |
55e217f |
check_shell (char *shell) {
|
|
cvsdist |
55e217f |
int i, c;
|
|
cvsdist |
55e217f |
|
|
cvsdist |
55e217f |
+ if (! *shell) shell = "/bin/sh"; /* Fudge it */
|
|
cvsdist |
55e217f |
+
|
|
cvsdist |
55e217f |
if (*shell != '/') {
|
|
cvsdist |
55e217f |
printf (_("%s: shell must be a full path name.\n"), whoami);
|
|
cvsdist |
55e217f |
return (-1);
|