mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
These routines let one compute the intersection of two sets of filecaps or capability rights, just as filecaps_merge() and cap_rights_merge() compute the union. This will be useful in an upcoming patch. filecaps_intersect() is complex due to the need to merge sets of ioctls. For now this is implemented with a dumb nested loop on the basis that ioctl lists are typically short enough that this is fine. It may be better to instead sort the two lists first and step through them together. No functional change intended. Approved by: so Security: FreeBSD-SA-26:66.jail Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D59885