[Bug 8586] adduser without -s (shell) creates invalid /etc/passwd entry
bugzilla at busybox.net
bugzilla at busybox.net
Thu Jan 26 17:53:35 UTC 2017
https://bugs.busybox.net/show_bug.cgi?id=8586
--- Comment #3 from Denys Vlasenko <vda.linux at googlemail.com> ---
adduser.c:
pw.pw_shell = (char *)get_shell_name();
get_shell_name(void)
{
struct passwd *pw;
char *shell;
shell = getenv("SHELL");
if (shell && shell[0])
return shell;
pw = getpwuid(getuid());
if (pw && pw->pw_shell && pw->pw_shell[0])
return pw->pw_shell;
return DEFAULT_SHELL;
}
DEFAULT_SHELL is "/bin/sh"
What you see can be explained by $SHELL or current user's shell being set to a
weird value.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list