core: don't fail to run services in --user instances if $HOME is missing
Otherwise we cannot even invoke systemd-exit.service anymore, thus not even exit. https://bugs.freedesktop.org/show_bug.cgi?id=83100 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759320
This commit is contained in:
+2
-1
@@ -1617,7 +1617,8 @@ static int exec_child(
|
||||
return -errno;
|
||||
}
|
||||
|
||||
if (chdir(context->working_directory ? context->working_directory : "/") < 0) {
|
||||
if (chdir(context->working_directory ?: "/") < 0 &&
|
||||
!context->working_directory_missing_ok) {
|
||||
*exit_status = EXIT_CHDIR;
|
||||
return -errno;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user