mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-02 12:20:51 +00:00
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
ef1e7a2656
commit
67d722ed73
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=101195
@ -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…
Reference in New Issue
Block a user