Introduce support for Mandatory Access Control and extensible
kernel access control. Teach devfs how to respond to pathconf() _POSIX_MAC_PRESENT queries, allowing it to indicate to user processes that individual vnode labels are available. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
This commit is contained in:
parent
fcd05421a1
commit
1fa5d0d927
@ -509,6 +509,17 @@ devfs_pathconf(ap)
|
||||
case _PC_PATH_MAX:
|
||||
*ap->a_retval = PATH_MAX;
|
||||
return (0);
|
||||
case _POSIX_MAC_PRESENT:
|
||||
#ifdef MAC
|
||||
/*
|
||||
* If MAC is enabled, devfs automatically supports
|
||||
* trivial non-persistant label storage.
|
||||
*/
|
||||
*ap->a_retval = 1;
|
||||
#else
|
||||
*ap->a_retval = 0;
|
||||
#endif /* MAC */
|
||||
return (0);
|
||||
default:
|
||||
return (vop_stdpathconf(ap));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user