loginsh is a global variable, use newshell for the update_shell()'s parameter.
This commit is contained in:
parent
f11bbd3b70
commit
bbb9470661
@ -23,6 +23,8 @@
|
|||||||
declaration. (add void)
|
declaration. (add void)
|
||||||
* src/login.c: login_prompt is the name of a function, use
|
* src/login.c: login_prompt is the name of a function, use
|
||||||
loginprompt for the internal variable.
|
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 <nicolas.francois@centraliens.net>
|
2008-01-01 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
|
@ -331,7 +331,7 @@ static void check_perms (const struct passwd *pw)
|
|||||||
*
|
*
|
||||||
* It will not return in case of error.
|
* 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 */
|
const struct passwd *pw; /* Password entry from /etc/passwd */
|
||||||
struct passwd pwent; /* New password entry */
|
struct passwd pwent; /* New password entry */
|
||||||
@ -389,7 +389,7 @@ static void update_shell (const char *user, char *loginsh)
|
|||||||
* fields remain unchanged.
|
* fields remain unchanged.
|
||||||
*/
|
*/
|
||||||
pwent = *pw;
|
pwent = *pw;
|
||||||
pwent.pw_shell = loginsh;
|
pwent.pw_shell = newshell;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Update the passwd file entry. If there is a DBM file, update
|
* Update the passwd file entry. If there is a DBM file, update
|
||||||
|
Loading…
x
Reference in New Issue
Block a user