Teach UFS to respond to pathconf() tests for _POSIX_ACL_EXTENDED and
_POSIX_MAC_PRESENT based on available mount flags, if the services are available. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
This commit is contained in:
parent
e8e5bc4ef9
commit
e0c12d4c23
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105567
@ -2188,6 +2188,26 @@ ufs_pathconf(ap)
|
||||
case _PC_NO_TRUNC:
|
||||
*ap->a_retval = 1;
|
||||
return (0);
|
||||
case _POSIX_ACL_EXTENDED:
|
||||
#ifdef UFS_ACL
|
||||
if (ap->a_vp->v_mount->mnt_flag & MNT_ACLS)
|
||||
*ap->a_retval = 1;
|
||||
else
|
||||
*ap->a_retval = 0;
|
||||
#else
|
||||
*ap->a_retval = 0;
|
||||
#endif
|
||||
return (0);
|
||||
case _POSIX_MAC_PRESENT:
|
||||
#ifdef MAC
|
||||
if (ap->a_vp->v_mount->mnt_flag & MNT_MULTILABEL)
|
||||
*ap->a_retval = 1;
|
||||
else
|
||||
*ap->a_retval = 0;
|
||||
#else
|
||||
*ap->a_retval = 0;
|
||||
#endif
|
||||
return (0);
|
||||
default:
|
||||
return (EINVAL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user