execute: use empty_to_root() a bit more
This commit is contained in:
parent
74e1252072
commit
14eb3285ab
|
@ -9,3 +9,8 @@ expression s;
|
||||||
@@
|
@@
|
||||||
- (empty_or_root(s) ? "/" : s)
|
- (empty_or_root(s) ? "/" : s)
|
||||||
+ empty_to_root(s)
|
+ empty_to_root(s)
|
||||||
|
@@
|
||||||
|
expression s;
|
||||||
|
@@
|
||||||
|
- (s ? s : "/")
|
||||||
|
+ empty_to_root(s)
|
||||||
|
|
|
@ -3245,10 +3245,8 @@ static int apply_working_directory(
|
||||||
|
|
||||||
wd = home;
|
wd = home;
|
||||||
|
|
||||||
} else if (context->working_directory)
|
} else
|
||||||
wd = context->working_directory;
|
wd = empty_to_root(context->working_directory);
|
||||||
else
|
|
||||||
wd = "/";
|
|
||||||
|
|
||||||
if (params->flags & EXEC_APPLY_CHROOT)
|
if (params->flags & EXEC_APPLY_CHROOT)
|
||||||
d = wd;
|
d = wd;
|
||||||
|
@ -5171,8 +5169,8 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) {
|
||||||
"%sProtectProc: %s\n"
|
"%sProtectProc: %s\n"
|
||||||
"%sProcSubset: %s\n",
|
"%sProcSubset: %s\n",
|
||||||
prefix, c->umask,
|
prefix, c->umask,
|
||||||
prefix, c->working_directory ? c->working_directory : "/",
|
prefix, empty_to_root(c->working_directory),
|
||||||
prefix, c->root_directory ? c->root_directory : "/",
|
prefix, empty_to_root(c->root_directory),
|
||||||
prefix, yes_no(c->non_blocking),
|
prefix, yes_no(c->non_blocking),
|
||||||
prefix, yes_no(c->private_tmp),
|
prefix, yes_no(c->private_tmp),
|
||||||
prefix, yes_no(c->private_devices),
|
prefix, yes_no(c->private_devices),
|
||||||
|
|
Loading…
Reference in a new issue