summaryrefslogtreecommitdiffstats
path: root/login-utils/chsh.c
diff options
context:
space:
mode:
Diffstat (limited to 'login-utils/chsh.c')
-rw-r--r--login-utils/chsh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/login-utils/chsh.c b/login-utils/chsh.c
index 3aa4f350b..5481f7c38 100644
--- a/login-utils/chsh.c
+++ b/login-utils/chsh.c
@@ -185,7 +185,7 @@ int main(int argc, char **argv)
if (check_shell(shell) < 0)
return EXIT_FAILURE;
- if (!strcmp(pw->pw_shell, shell))
+ if (strcmp(oldshell, shell) == 0)
errx(EXIT_SUCCESS, _("Shell not changed."));
pw->pw_shell = shell;
if (setpwnam(pw) < 0) {