diff options
author | trasz <trasz@FreeBSD.org> | 2010-05-23 08:12:36 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2010-05-23 08:12:36 +0000 |
commit | 2040787fbf16a85e2981be38ab2dadfbec05426f (patch) | |
tree | e9148eb5305b7cc22afac318150abae97be6ac61 /lib/libc/posix1e/acl_perm.c | |
parent | 618c7e8625fd65c7ed1740e0895014d7f43f259e (diff) | |
download | FreeBSD-src-2040787fbf16a85e2981be38ab2dadfbec05426f.zip FreeBSD-src-2040787fbf16a85e2981be38ab2dadfbec05426f.tar.gz |
Make acl_get_perm_np(3) work with NFSv4 ACLs.
Reviewed by: kientzle@
MFC after: 1 week
Diffstat (limited to 'lib/libc/posix1e/acl_perm.c')
-rw-r--r-- | lib/libc/posix1e/acl_perm.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/libc/posix1e/acl_perm.c b/lib/libc/posix1e/acl_perm.c index b5108ca..ad2f47e 100644 --- a/lib/libc/posix1e/acl_perm.c +++ b/lib/libc/posix1e/acl_perm.c @@ -108,3 +108,21 @@ acl_delete_perm(acl_permset_t permset_d, acl_perm_t perm) return (0); } + +int +acl_get_perm_np(acl_permset_t permset_d, acl_perm_t perm) +{ + + if (permset_d == NULL) { + errno = EINVAL; + return (-1); + } + + if (_perm_is_invalid(perm)) + return (-1); + + if (*permset_d & perm) + return (1); + + return (0); +} |