opnsense-src/lib/libc/capability
Mark Johnston 81be2f8bec file: Add filecaps_intersect() and cap_rights_intersect()
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
2026-09-30 11:46:45 +02:00
..
cap_rights_init.3 file: Add filecaps_intersect() and cap_rights_intersect() 2026-09-30 11:46:45 +02:00
Makefile.inc cap_rights_is_empty: add MLINK 2024-12-02 15:35:40 -05:00
Symbol.map capsicum: introduce cap_rights_is_empty Function 2023-12-11 12:15:46 +01:00