mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
jail: fix crash with startup commands on a jail without name
Jail name is optional, thus don't try setenv(NULL).
Fixes: d8f021add4
This commit is contained in:
1 parent
c70f382a8b
commit
78c4f821f4
1 file changed
+2
-2
@@ -814,8 +814,8 @@ run_command(struct cfjail *j)
|
||||
if (!injail) {
|
||||
if (string_param(j->intparams[KP_JID]))
|
||||
setenv("JID", string_param(j->intparams[KP_JID]), 1);
|
||||
setenv("JNAME", string_param(j->intparams[KP_NAME]), 1);
|
||||
|
||||
if (string_param(j->intparams[KP_NAME]))
|
||||
setenv("JNAME", string_param(j->intparams[KP_NAME]), 1);
|
||||
path = string_param(j->intparams[KP_PATH]);
|
||||
setenv("JPATH", path ? path : "", 1);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user