diff options
| author | Robert Watson <rwatson@FreeBSD.org> | 2000-01-26 04:19:38 +0000 |
|---|---|---|
| committer | Robert Watson <rwatson@FreeBSD.org> | 2000-01-26 04:19:38 +0000 |
| commit | 8f45e8c07611579a6a623ef2201082816c2f39ae (patch) | |
| tree | 3c9c6a2c285edd25bc3bf350bab4af093e85f3aa /lib/libposix1e/acl_get.c | |
| parent | 2fff585062e948ff849437905d9b51be9658b2b6 (diff) | |
Notes
Diffstat (limited to 'lib/libposix1e/acl_get.c')
| -rw-r--r-- | lib/libposix1e/acl_get.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/lib/libposix1e/acl_get.c b/lib/libposix1e/acl_get.c index 1293f0b73907..494eed7723ab 100644 --- a/lib/libposix1e/acl_get.c +++ b/lib/libposix1e/acl_get.c @@ -27,6 +27,8 @@ */ /* * acl_get_file - syscall wrapper for retrieving ACL by filename + * acl_get_fd - syscall wrapper for retrieving access ACL by fd + * acl_get_fd_np - syscall wrapper for retrieving ACL by fd (non-POSIX) */ #include <sys/types.h> @@ -54,9 +56,28 @@ acl_get_file(const char *path_p, acl_type_t type) return (aclp); } +acl_t +acl_get_fd(int fd) +{ + struct acl *aclp; + int error; + + aclp = acl_init(ACL_MAX_ENTRIES); + if (!aclp) { + return (0); + } + + error = __acl_get_fd(fd, ACL_TYPE_ACCESS, aclp); + if (error) { + acl_free(aclp); + return (0); + } + + return (aclp); +} acl_t -acl_get_fd(int fd, acl_type_t type) +acl_get_fd_np(int fd, acl_type_t type) { struct acl *aclp; int error; |
