diff options
author | trasz <trasz@FreeBSD.org> | 2010-09-09 20:07:40 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2010-09-09 20:07:40 +0000 |
commit | d7dd2333f7ef722e5043b7f2237605b261cf0f31 (patch) | |
tree | 5d86450cc5895a54b22fe2b8ea9605691169417a /lib/libc/posix1e | |
parent | af3323bd63c6c570cdc47e06d7aa93fb366241fc (diff) | |
download | FreeBSD-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.c | 9 |
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. */ |