aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2024-01-03 22:17:59 +0000
committerKyle Evans <kevans@FreeBSD.org>2024-01-15 22:27:59 +0000
commit426b28fdf700bcd8c05b25665da34f806b27b1bb (patch)
treecb742c18c6eae4c723053f9a4fa7cf0d8c179eeb /include
parent554b8bc90704e06434a0e775092a8eca6d319031 (diff)
bhyveload: use a dirfd to support -h
Don't allow lookups from the loader scripts, which in rare cases may be in guest control depending on the setup, to leave the specified host root. Open the root dir and strictly do RESOLVE_BENEATH lookups from there. cb_open() has been restructured a bit to work nicely with this, using fdopendir() in the directory case and just using the fd we already opened in the regular file case. hostbase_open() was split out to provide an obvious place to apply rights(4) if that's something we care to do. Reviewed by: allanjude (earlier version), markj (cherry picked from commit 6779d44bd878e3cf4723f7386b11da6508ab5431)
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions