mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 19:52:44 +00:00
Bugfix: all requests for creating vnets via vimage -c were always
reported as failures, even if the actual library / system call would succeed, because error message would be reported if the return value from jail_setv() call was >= 0, and if not, then if that same value was < 0, i.e. always. The correct behavior is to abort (only) if jail_setv() returns < 0. Approved by: re (rwatson), julian (mentor)
This commit is contained in:
parent
cd81cd3fd1
commit
2b97862843
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=196421
@ -252,7 +252,7 @@ main(int argc, char **argv)
|
||||
exit(0);
|
||||
|
||||
case VI_CREATE:
|
||||
if ((jid = jail_setv(JAIL_CREATE,
|
||||
if (jail_setv(JAIL_CREATE,
|
||||
"name", argv[0],
|
||||
"vnet", NULL,
|
||||
"host", NULL,
|
||||
@ -260,9 +260,7 @@ main(int argc, char **argv)
|
||||
"allow.raw_sockets", "true",
|
||||
"allow.socket_af", "true",
|
||||
"allow.mount", "true",
|
||||
NULL)) >= 0)
|
||||
break;
|
||||
if (jid < 0)
|
||||
NULL) < 0)
|
||||
break;
|
||||
if (argc == 1)
|
||||
exit(0);
|
||||
|
Loading…
Reference in New Issue
Block a user