acl_get.c (74667) | acl_get.c (75185) |
---|---|
1/*- 2 * Copyright (c) 1999, 2000, 2001 Robert N. M. Watson 3 * All rights reserved. 4 * 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 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 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 * | 1/*- 2 * Copyright (c) 1999, 2000, 2001 Robert N. M. Watson 3 * All rights reserved. 4 * 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 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 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 * $FreeBSD: head/lib/libc/posix1e/acl_get.c 74667 2001-03-22 22:31:01Z jedgar $ | 26 * $FreeBSD: head/lib/libc/posix1e/acl_get.c 75185 2001-04-04 18:00:52Z tmm $ |
27 */ 28/* 29 * acl_get_file - syscall wrapper for retrieving ACL by filename 30 * acl_get_fd - syscall wrapper for retrieving access ACL by fd 31 * acl_get_fd_np - syscall wrapper for retrieving ACL by fd (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/types.h> | 27 */ 28/* 29 * acl_get_file - syscall wrapper for retrieving ACL by filename 30 * acl_get_fd - syscall wrapper for retrieving access ACL by fd 31 * acl_get_fd_np - syscall wrapper for retrieving ACL by fd (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/types.h> |
38#include "namespace.h" |
|
38#include <sys/acl.h> | 39#include <sys/acl.h> |
40#include "un-namespace.h" |
|
39 40#include <errno.h> 41#include <stdlib.h> 42#include <string.h> 43 44acl_t 45acl_get_file(const char *path_p, acl_type_t type) 46{ --- 20 unchanged lines hidden (view full) --- 67 struct acl *aclp; 68 int error; 69 70 aclp = acl_init(ACL_MAX_ENTRIES); 71 if (!aclp) { 72 return (NULL); 73 } 74 | 41 42#include <errno.h> 43#include <stdlib.h> 44#include <string.h> 45 46acl_t 47acl_get_file(const char *path_p, acl_type_t type) 48{ --- 20 unchanged lines hidden (view full) --- 69 struct acl *aclp; 70 int error; 71 72 aclp = acl_init(ACL_MAX_ENTRIES); 73 if (!aclp) { 74 return (NULL); 75 } 76 |
75 error = __acl_get_fd(fd, ACL_TYPE_ACCESS, aclp); | 77 error = ___acl_get_fd(fd, ACL_TYPE_ACCESS, aclp); |
76 if (error) { 77 acl_free(aclp); 78 return (NULL); 79 } 80 81 return (aclp); 82} 83 84acl_t 85acl_get_fd_np(int fd, acl_type_t type) 86{ 87 struct acl *aclp; 88 int error; 89 90 aclp = acl_init(ACL_MAX_ENTRIES); 91 if (!aclp) { 92 return (NULL); 93 } 94 | 78 if (error) { 79 acl_free(aclp); 80 return (NULL); 81 } 82 83 return (aclp); 84} 85 86acl_t 87acl_get_fd_np(int fd, acl_type_t type) 88{ 89 struct acl *aclp; 90 int error; 91 92 aclp = acl_init(ACL_MAX_ENTRIES); 93 if (!aclp) { 94 return (NULL); 95 } 96 |
95 error = __acl_get_fd(fd, type, aclp); | 97 error = ___acl_get_fd(fd, type, aclp); |
96 if (error) { 97 acl_free(aclp); 98 return (NULL); 99 } 100 101 return (aclp); 102} 103 --- 51 unchanged lines hidden --- | 98 if (error) { 99 acl_free(aclp); 100 return (NULL); 101 } 102 103 return (aclp); 104} 105 --- 51 unchanged lines hidden --- |