From: nekral-guest Date: Sat, 5 Jan 2008 13:54:39 +0000 (+0000) Subject: loginsh is a global variable, use newshell for the update_shell()'s parameter. X-Git-Tag: 4.1.1~142 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bbb9470661a616144e7ed4e3504b7b8a4babf677;p=shadow loginsh is a global variable, use newshell for the update_shell()'s parameter. --- diff --git a/ChangeLog b/ChangeLog index 0d2a3ecb..72fe0761 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,6 +23,8 @@ declaration. (add void) * src/login.c: login_prompt is the name of a function, use loginprompt for the internal variable. + * src/chsh.c: loginsh is a global variable, use newshell for the + update_shell()'s parameter. 2008-01-01 Nicolas François diff --git a/src/chsh.c b/src/chsh.c index 6e1e5eda..b6e63e00 100644 --- a/src/chsh.c +++ b/src/chsh.c @@ -331,7 +331,7 @@ static void check_perms (const struct passwd *pw) * * It will not return in case of error. */ -static void update_shell (const char *user, char *loginsh) +static void update_shell (const char *user, char *newshell) { const struct passwd *pw; /* Password entry from /etc/passwd */ struct passwd pwent; /* New password entry */ @@ -389,7 +389,7 @@ static void update_shell (const char *user, char *loginsh) * fields remain unchanged. */ pwent = *pw; - pwent.pw_shell = loginsh; + pwent.pw_shell = newshell; /* * Update the passwd file entry. If there is a DBM file, update