acl_get.c (92986) | acl_get.c (108410) |
---|---|
1/*- | 1/*- |
2 * Copyright (c) 1999, 2000, 2001 Robert N. M. Watson | 2 * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson |
3 * All rights reserved. 4 * | 3 * All rights reserved. 4 * |
5 * This software was developed by Robert Watson for the TrustedBSD Project. 6 * |
|
5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. --- 6 unchanged lines hidden (view full) --- 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26/* | 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. --- 6 unchanged lines hidden (view full) --- 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 */ 28/* |
27 * acl_get_file - syscall wrapper for retrieving ACL by filename | |
28 * acl_get_fd - syscall wrapper for retrieving access ACL by fd 29 * acl_get_fd_np - syscall wrapper for retrieving ACL by fd (non-POSIX) | 29 * acl_get_fd - syscall wrapper for retrieving access ACL by fd 30 * acl_get_fd_np - syscall wrapper for retrieving ACL by fd (non-POSIX) |
31 * acl_get_file - syscall wrapper for retrieving ACL by filename 32 * acl_get_link_np - syscall wrapper for retrieving ACL by filename (NOFOLLOW) 33 * (non-POSIX) |
|
30 * acl_get_perm_np() checks if a permission is in the specified 31 * permset (non-POSIX) 32 * acl_get_permset() returns the permission set in the ACL entry 33 * acl_get_qualifier() retrieves the qualifier of the tag from the ACL entry 34 * acl_get_tag_type() returns the tag type for the ACL entry entry_d 35 */ 36 37#include <sys/cdefs.h> | 34 * acl_get_perm_np() checks if a permission is in the specified 35 * permset (non-POSIX) 36 * acl_get_permset() returns the permission set in the ACL entry 37 * acl_get_qualifier() retrieves the qualifier of the tag from the ACL entry 38 * acl_get_tag_type() returns the tag type for the ACL entry entry_d 39 */ 40 41#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/lib/libc/posix1e/acl_get.c 92986 2002-03-22 21:53:29Z obrien $"); | 42__FBSDID("$FreeBSD: head/lib/libc/posix1e/acl_get.c 108410 2002-12-29 20:47:05Z rwatson $"); |
39 40#include <sys/types.h> 41#include "namespace.h" 42#include <sys/acl.h> 43#include "un-namespace.h" 44 45#include <errno.h> 46#include <stdlib.h> --- 14 unchanged lines hidden (view full) --- 61 acl_free(aclp); 62 return (NULL); 63 } 64 65 return (aclp); 66} 67 68acl_t | 43 44#include <sys/types.h> 45#include "namespace.h" 46#include <sys/acl.h> 47#include "un-namespace.h" 48 49#include <errno.h> 50#include <stdlib.h> --- 14 unchanged lines hidden (view full) --- 65 acl_free(aclp); 66 return (NULL); 67 } 68 69 return (aclp); 70} 71 72acl_t |
73acl_get_link_np(const char *path_p, acl_type_t type) 74{ 75 acl_t aclp; 76 int error; 77 78 aclp = acl_init(ACL_MAX_ENTRIES); 79 if (aclp == NULL) 80 return (NULL); 81 82 error = __acl_get_link(path_p, type, &aclp->ats_acl); 83 if (error) { 84 acl_free(aclp); 85 return (NULL); 86 } 87 88 return (aclp); 89} 90 91acl_t |
|
69acl_get_fd(int fd) 70{ 71 acl_t aclp; 72 int error; 73 74 aclp = acl_init(ACL_MAX_ENTRIES); 75 if (aclp == NULL) 76 return (NULL); --- 116 unchanged lines hidden --- | 92acl_get_fd(int fd) 93{ 94 acl_t aclp; 95 int error; 96 97 aclp = acl_init(ACL_MAX_ENTRIES); 98 if (aclp == NULL) 99 return (NULL); --- 116 unchanged lines hidden --- |