]> git.pld-linux.org Git - packages/util-linux.git/blob - util-linux-chsh.patch
- uniformized configs to use system-auth where possible
[packages/util-linux.git] / util-linux-chsh.patch
1 - chsh to /bin/sh leaves shell field of /etc/passwd blank
2
3 --- util-linux-2.11y/login-utils/chsh.c.sopwith Fri Sep  5 08:51:49 2003
4 +++ util-linux-2.11y/login-utils/chsh.c Fri Sep  5 08:53:43 2003
5 @@ -185,7 +185,6 @@
6         printf (_("Shell not changed.\n"));
7         return 0;
8      }
9 -    if (!strcmp(shell, "/bin/sh")) shell = "";
10      pw->pw_shell = shell;
11      if (setpwnam (pw) < 0) {
12         perror ("setpwnam");
13 @@ -299,6 +298,8 @@
14  check_shell (char *shell) {
15      int i, c;
16  
17 +    if (! *shell) shell = "/bin/sh"; /* Fudge it */
18 +
19      if (*shell != '/') {
20         printf (_("%s: shell must be a full path name.\n"), whoami);
21         return (-1);
This page took 0.234833 seconds and 3 git commands to generate.