diff options
| author | Robert Watson <rwatson@FreeBSD.org> | 2002-12-29 20:47:05 +0000 |
|---|---|---|
| committer | Robert Watson <rwatson@FreeBSD.org> | 2002-12-29 20:47:05 +0000 |
| commit | 6394f703dcdf80f1fd010d508645732880f46d93 (patch) | |
| tree | 985bdae2196acf3128685ad7f46fecd574f00a3f /lib/libc/posix1e/acl_get.c | |
| parent | a95f262c6b67d086d3bffa6c87d4b0c909519d27 (diff) | |
Notes
Diffstat (limited to 'lib/libc/posix1e/acl_get.c')
| -rw-r--r-- | lib/libc/posix1e/acl_get.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/lib/libc/posix1e/acl_get.c b/lib/libc/posix1e/acl_get.c index 87a51ddf168a..1f97baaecabc 100644 --- a/lib/libc/posix1e/acl_get.c +++ b/lib/libc/posix1e/acl_get.c @@ -1,7 +1,9 @@ /*- - * Copyright (c) 1999, 2000, 2001 Robert N. M. Watson + * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson * All rights reserved. * + * This software was developed by Robert Watson for the TrustedBSD Project. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -24,9 +26,11 @@ * SUCH DAMAGE. */ /* - * 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) + * acl_get_file - syscall wrapper for retrieving ACL by filename + * acl_get_link_np - syscall wrapper for retrieving ACL by filename (NOFOLLOW) + * (non-POSIX) * acl_get_perm_np() checks if a permission is in the specified * permset (non-POSIX) * acl_get_permset() returns the permission set in the ACL entry @@ -66,6 +70,25 @@ acl_get_file(const char *path_p, acl_type_t type) } acl_t +acl_get_link_np(const char *path_p, acl_type_t type) +{ + acl_t aclp; + int error; + + aclp = acl_init(ACL_MAX_ENTRIES); + if (aclp == NULL) + return (NULL); + + error = __acl_get_link(path_p, type, &aclp->ats_acl); + if (error) { + acl_free(aclp); + return (NULL); + } + + return (aclp); +} + +acl_t acl_get_fd(int fd) { acl_t aclp; |
