summaryrefslogtreecommitdiffstats
path: root/lib/libc/posix1e
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2010-09-09 20:07:40 +0000
committertrasz <trasz@FreeBSD.org>2010-09-09 20:07:40 +0000
commitd7dd2333f7ef722e5043b7f2237605b261cf0f31 (patch)
tree5d86450cc5895a54b22fe2b8ea9605691169417a /lib/libc/posix1e
parentaf3323bd63c6c570cdc47e06d7aa93fb366241fc (diff)
downloadFreeBSD-src-d7dd2333f7ef722e5043b7f2237605b261cf0f31.zip
FreeBSD-src-d7dd2333f7ef722e5043b7f2237605b261cf0f31.tar.gz
Add minor optimization. It's less strict than its kernel counterpart
due to upcoming ACL changes required by the new ZFS.
Diffstat (limited to 'lib/libc/posix1e')
-rw-r--r--lib/libc/posix1e/acl_strip.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libc/posix1e/acl_strip.c b/lib/libc/posix1e/acl_strip.c
index f86d379..be36afa 100644
--- a/lib/libc/posix1e/acl_strip.c
+++ b/lib/libc/posix1e/acl_strip.c
@@ -176,6 +176,15 @@ acl_is_trivial_np(const acl_t aclp, int *trivialp)
case ACL_BRAND_NFS4:
/*
+ * If the ACL has more than canonical six entries,
+ * it's non trivial by definition.
+ */
+ if (aclp->ats_acl.acl_cnt > 6) {
+ *trivialp = 1;
+ return (0);
+ }
+
+ /*
* Calculate trivial ACL - using acl_strip_np - and compare
* with the original.
*/
OpenPOWER on IntegriCloud