acl.h (74432) | acl.h (74667) |
---|---|
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/sys/sys/acl.h 74432 2001-03-19 03:19:51Z jedgar $ | 26 * $FreeBSD: head/sys/sys/acl.h 74667 2001-03-22 22:31:01Z jedgar $ |
27 */ 28/* 29 * Developed by the TrustedBSD Project. 30 * Support for POSIX.1e access control lists. 31 */ 32 33#ifndef _SYS_ACL_H 34#define _SYS_ACL_H --- 7 unchanged lines hidden (view full) --- 42#define POSIX1E_ACL_DEFAULT_EXTATTR_NAMESPACE EXTATTR_NAMESPACE_SYSTEM 43#define POSIX1E_ACL_DEFAULT_EXTATTR_NAME "posix1e.acl_default" 44#define ACL_MAX_ENTRIES 32 /* maximum entries in an ACL */ 45#define _POSIX_ACL_PATH_MAX ACL_MAX_ENTRIES 46 47typedef int acl_type_t; 48typedef int acl_tag_t; 49typedef mode_t acl_perm_t; | 27 */ 28/* 29 * Developed by the TrustedBSD Project. 30 * Support for POSIX.1e access control lists. 31 */ 32 33#ifndef _SYS_ACL_H 34#define _SYS_ACL_H --- 7 unchanged lines hidden (view full) --- 42#define POSIX1E_ACL_DEFAULT_EXTATTR_NAMESPACE EXTATTR_NAMESPACE_SYSTEM 43#define POSIX1E_ACL_DEFAULT_EXTATTR_NAME "posix1e.acl_default" 44#define ACL_MAX_ENTRIES 32 /* maximum entries in an ACL */ 45#define _POSIX_ACL_PATH_MAX ACL_MAX_ENTRIES 46 47typedef int acl_type_t; 48typedef int acl_tag_t; 49typedef mode_t acl_perm_t; |
50typedef mode_t *acl_permset_t; |
|
50 51struct acl_entry { 52 acl_tag_t ae_tag; 53 uid_t ae_id; 54 acl_perm_t ae_perm; 55}; 56typedef struct acl_entry *acl_entry_t; 57 --- 70 unchanged lines hidden (view full) --- 128 129/* 130 * Supported POSIX.1e ACL manipulation and assignment/retrieval API 131 * _np calls are local extensions that reflect an environment capable of 132 * opening file descriptors of directories, and allowing additional 133 * ACL type for different file systems (i.e., AFS). 134 */ 135__BEGIN_DECLS | 51 52struct acl_entry { 53 acl_tag_t ae_tag; 54 uid_t ae_id; 55 acl_perm_t ae_perm; 56}; 57typedef struct acl_entry *acl_entry_t; 58 --- 70 unchanged lines hidden (view full) --- 129 130/* 131 * Supported POSIX.1e ACL manipulation and assignment/retrieval API 132 * _np calls are local extensions that reflect an environment capable of 133 * opening file descriptors of directories, and allowing additional 134 * ACL type for different file systems (i.e., AFS). 135 */ 136__BEGIN_DECLS |
137int acl_add_perm(acl_permset_t _permset_d, acl_perm_t _perm); |
|
136int acl_calc_mask(acl_t *acl_p); | 138int acl_calc_mask(acl_t *acl_p); |
139int acl_clear_perms(acl_permset_t _permset_d); 140int acl_copy_entry(acl_entry_t _dest_d, acl_entry_t _src_d); 141ssize_t acl_copy_ext(void *_buf_p, acl_t _acl, ssize_t _size); 142acl_t acl_copy_int(const void *_buf_p); 143int acl_create_entry(acl_t *_acl_p, acl_entry_t *_entry_p); |
|
137int acl_delete_fd_np(int _filedes, acl_type_t _type); 138int acl_delete_entry(acl_t acl, acl_entry_t entry_d); 139int acl_delete_file_np(const char *_path_p, acl_type_t _type); 140int acl_delete_def_file(const char *_path_p); | 144int acl_delete_fd_np(int _filedes, acl_type_t _type); 145int acl_delete_entry(acl_t acl, acl_entry_t entry_d); 146int acl_delete_file_np(const char *_path_p, acl_type_t _type); 147int acl_delete_def_file(const char *_path_p); |
148int acl_delete_perm(acl_permset_t _permset_d, acl_perm_t _perm); |
|
141acl_t acl_dup(acl_t _acl); 142int acl_free(void *_obj_p); 143acl_t acl_from_text(const char *_buf_p); | 149acl_t acl_dup(acl_t _acl); 150int acl_free(void *_obj_p); 151acl_t acl_from_text(const char *_buf_p); |
152int acl_get_entry(acl_t _acl, int _entry_id, acl_entry_t *_entry_p); |
|
144acl_t acl_get_fd(int _fd); 145acl_t acl_get_fd_np(int fd, acl_type_t _type); 146acl_t acl_get_file(const char *_path_p, acl_type_t _type); | 153acl_t acl_get_fd(int _fd); 154acl_t acl_get_fd_np(int fd, acl_type_t _type); 155acl_t acl_get_file(const char *_path_p, acl_type_t _type); |
156void *acl_get_qualifier(acl_entry_t _entry_d); 157int acl_get_permset(acl_entry_t _entry_d, acl_permset_t *_permset_p); 158int acl_get_tag_type(acl_entry_t _entry_d, acl_tag_t *_tag_type_p); |
|
147acl_t acl_init(int _count); 148int acl_set_fd(int _fd, acl_t _acl); 149int acl_set_fd_np(int _fd, acl_t _acl, acl_type_t _type); 150int acl_set_file(const char *_path_p, acl_type_t _type, acl_t _acl); | 159acl_t acl_init(int _count); 160int acl_set_fd(int _fd, acl_t _acl); 161int acl_set_fd_np(int _fd, acl_t _acl, acl_type_t _type); 162int acl_set_file(const char *_path_p, acl_type_t _type, acl_t _acl); |
163int acl_set_permset(acl_entry_t _entry_d, acl_permset_t _permset_d); 164int acl_set_qualifier(acl_entry_t _entry_d, const void *_tag_qualifier_p); 165int acl_set_tag_type(acl_entry_t _entry_d, acl_tag_t _tag_type); 166ssize_t acl_size(acl_t _acl); |
|
151char *acl_to_text(acl_t _acl, ssize_t *_len_p); 152int acl_valid(acl_t _acl); 153int acl_valid_fd_np(int _fd, acl_type_t _type, acl_t _acl); 154int acl_valid_file_np(const char *_path_p, acl_type_t _type, acl_t _acl); 155__END_DECLS 156 157#endif /* !_KERNEL */ 158 159#endif /* !_SYS_ACL_H */ | 167char *acl_to_text(acl_t _acl, ssize_t *_len_p); 168int acl_valid(acl_t _acl); 169int acl_valid_fd_np(int _fd, acl_type_t _type, acl_t _acl); 170int acl_valid_file_np(const char *_path_p, acl_type_t _type, acl_t _acl); 171__END_DECLS 172 173#endif /* !_KERNEL */ 174 175#endif /* !_SYS_ACL_H */ |