]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
bectl(8): Check jailparam_* return values
authorkevans <kevans@FreeBSD.org>
Tue, 14 Aug 2018 18:35:33 +0000 (18:35 +0000)
committerkevans <kevans@FreeBSD.org>
Tue, 14 Aug 2018 18:35:33 +0000 (18:35 +0000)
commit0945f4125ac045cbe988ccbf29785941a3896883
tree5bd3c4146ef516376704d98edb1c78a1c01ef27f
parent17e1e9b97a475bbc8ee31f3442e3d3ae9892b3e5
bectl(8): Check jailparam_* return values

Previous iteration of this assumed that these won't fail because we've
already setup the jail param to this point, but the allocations could still
fail in pretty bad conditions.

Admit that it's possible and return (ENOENT, EINVAL, ENOMEM, or 0) when
deleting arguments. EINVAL shouldn't happen since we're passing optarg;
which may satisfy *optarg == '\0' but never optarg == NULL.

CID: 13948851394901
sbin/bectl/bectl_jail.c