diff --git a/debian/changelog b/debian/changelog index ff8e70e..6efa0aa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +util-linux (2.38.1-ok2) yangtze; urgency=medium + + * Apply patchs. + + -- sufang Fri, 17 Feb 2023 15:16:15 +0800 + util-linux (2.38.1-ok1) yangtze; urgency=medium * Update upstream version. diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c index 4c2daa6..4cd17db 100644 --- a/login-utils/sulogin.c +++ b/login-utils/sulogin.c @@ -866,6 +866,11 @@ static void sushell(struct passwd *pwd) xsetenv("SHELL", "/bin/sh", 1); execl("/bin/sh", profile ? "-sh" : "sh", (char *)NULL); warn(_("failed to execute %s"), "/bin/sh"); + + /* Fall back to static shell */ + setenv("SHELL", "/bin/static-sh", 1); + execl("/bin/static-sh", profile ? "-sh" : "sh", (char *)NULL); + warn(_("failed to execute %s"), "/bin/static-sh"); } static void usage(void) @@ -1052,7 +1057,8 @@ int main(int argc, char **argv) const char *passwd = pwd->pw_passwd; char *answer; int doshell = 0; - int deny = !opt_e && locked_account_password(pwd->pw_passwd); + /* Ubuntu's root account is locked by default allow access without --force */ + int deny = 0; doprompt(passwd, con, deny);