mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-23 16:01:42 +00:00
bhyveload: add CAP_SEEK to our dirfd rights
In the case of hostbase_fd, this is infact a bug fix; we have a seek callback that the host: filesystem may use in loader, and we really don't have a good excuse to break it. bootfd-derived fds will only be used with fdlopen(3) and rtld doesn't seem to need pread / lseek at all for it today, but there's no reason to break if it finds a good reason to later. Suggested by: markj
This commit is contained in:
parent
59ce044a78
commit
cef5e56f3f
@ -755,7 +755,7 @@ hostbase_open(const char *base)
|
||||
err(EX_OSERR, "open");
|
||||
|
||||
if (caph_rights_limit(hostbase_fd, cap_rights_init(&rights, CAP_FSTATAT,
|
||||
CAP_LOOKUP, CAP_READ)) < 0)
|
||||
CAP_LOOKUP, CAP_PREAD)) < 0)
|
||||
err(EX_OSERR, "caph_rights_limit");
|
||||
}
|
||||
|
||||
@ -887,7 +887,7 @@ main(int argc, char** argv)
|
||||
* to the more usual lookup rights.
|
||||
*/
|
||||
if (caph_rights_limit(bootfd, cap_rights_init(&rights,
|
||||
CAP_FSTATAT, CAP_LOOKUP, CAP_MMAP_RX, CAP_READ)) < 0)
|
||||
CAP_FSTATAT, CAP_LOOKUP, CAP_MMAP_RX, CAP_PREAD)) < 0)
|
||||
err(1, "caph_rights_limit");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user