meson: make nologin path build time configurable
Some distros install nologin as /usr/sbin/nologin, others as /sbin/nologin. Since we can't really on merged-usr everywhere (where the path wouldn't matter), make the path build time configurable via -Dnologin-path=. Closes #13028
This commit is contained in:
@@ -148,7 +148,7 @@ static int synthesize_user_creds(
|
||||
*home = FLAGS_SET(flags, USER_CREDS_CLEAN) ? NULL : "/";
|
||||
|
||||
if (shell)
|
||||
*shell = FLAGS_SET(flags, USER_CREDS_CLEAN) ? NULL : "/sbin/nologin";
|
||||
*shell = FLAGS_SET(flags, USER_CREDS_CLEAN) ? NULL : NOLOGIN;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -538,7 +538,7 @@ int get_shell(char **_s) {
|
||||
}
|
||||
if (synthesize_nobody() &&
|
||||
u == UID_NOBODY) {
|
||||
s = strdup("/sbin/nologin");
|
||||
s = strdup(NOLOGIN);
|
||||
if (!s)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user