From 9d17032f6467d17dcacd2fd7be924b8a5397f645 Mon Sep 17 00:00:00 2001 From: rwatson Date: Sun, 20 Oct 2002 21:49:41 +0000 Subject: 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 --- sys/ufs/ufs/ufs_vnops.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 47f392a..2aad545 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -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); } -- cgit v1.1