]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
jail_getid(3): add special-case immediate return for jid 0
authorkevans <kevans@FreeBSD.org>
Sun, 2 Jun 2019 14:03:56 +0000 (14:03 +0000)
committerkevans <kevans@FreeBSD.org>
Sun, 2 Jun 2019 14:03:56 +0000 (14:03 +0000)
commitebec61f967c8671f5e149b1edefa3523bd6268db
tree07f13cf55a6c1b7831624f9cf34cd065aeddf096
parent0a5977d3171e20a30c0e1ef2737595713f1f7e8a
jail_getid(3): add special-case immediate return for jid 0

As depicted in the comment: jid 0 always exists, but the lookup will fail as
it does not appear in the kernel's alljails list being a special jail. Some
callers will expect/rely on this, and we have no reason to lie because it
does always exist.

Reported by: Stefan Hegnauer <stefan.hegnauer gmx ch>
MFC after: soon (regression, breaks inspecting jail host bits, partial
revert)
lib/libjail/jail_getid.c