mirror of
https://github.com/systemd/systemd.git
synced 2024-10-28 11:55:44 +03:00
core: require $XDG_RUNTIME_DIR to be set for user instances
It seems that some places use /run otherwise, which isn't going to work.
This commit is contained in:
parent
aed2ebfed0
commit
3f6da75bce
@ -1383,6 +1383,12 @@ int main(int argc, char *argv[]) {
|
||||
goto finish;
|
||||
}
|
||||
|
||||
if (arg_running_as == SYSTEMD_USER &&
|
||||
!getenv("XDG_RUNTIME_DIR")) {
|
||||
log_error("Trying to run as user instance, but \$XDG_RUNTIME_DIR is not set.");
|
||||
goto finish;
|
||||
}
|
||||
|
||||
if (arg_running_as == SYSTEMD_SYSTEM &&
|
||||
arg_action == ACTION_RUN &&
|
||||
running_in_chroot() > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user