Use new default-user-shell option instead of hard-coding bash in nspawn and user-record

Defaults to /bin/bash, no changes in the default configuration

The fallback shell for non-root users is as-specified,
and the interactive shell for nspawn sessions is started as
  exec(default-user-shell, "-" + basename(default-user-shell), ...)
before falling through to bash and sh
This commit is contained in:
наб
2022-03-28 14:24:46 +02:00
committed by Lennart Poettering
parent 505df87ea8
commit 53350c7bba
4 changed files with 13 additions and 4 deletions
+1 -1
View File
@@ -1747,7 +1747,7 @@ const char *user_record_shell(UserRecord *h) {
return "/bin/sh";
if (user_record_disposition(h) == USER_REGULAR)
return "/bin/bash";
return DEFAULT_USER_SHELL;
return NOLOGIN;
}