/src/lib/libc/posix1e/ |
acl_valid.c | 31 * acl_valid -- POSIX.1e ACL check routine 43 #include <sys/acl.h> 50 * acl_valid: accepts an ACL, returns 0 on valid ACL, -1 for invalid, 55 * true. POSIX.1e allows acl_valid() to reorder the ACL as it sees fit. 57 * This call is deprecated, as it doesn't ask whether the ACL is valid 62 acl_valid(acl_t acl) 66 if (acl == NULL) { 70 if (!_acl_brand_may_be(acl, ACL_BRAND_POSIX)) { 74 _posix1e_acl_sort(acl); [all...] |
acl_branding.c | 38 #include <sys/acl.h> 45 * of what "brand" ACL is: NFSv4, POSIX.1e or unknown. It happens 46 * automatically - for example, during acl_get_file(3) ACL gets 48 * ACL, if its brand is unknown it gets branded as NFSv4 if any of the 49 * NFSv4 permissions that are not valid for POSIX.1e ACL are set etc. 50 * Branding information is used for printing out the ACL (acl_to_text(3)), 52 * bits that are valid only for NFSv4 in ACL branded as POSIX.1e) etc. 66 * Return brand of an ACL. 69 _acl_brand(const acl_t acl) 72 return (acl->ats_brand) [all...] |
acl_init.c | 29 * acl_init -- return a fresh acl structure 30 * acl_dup -- duplicate an acl and return the new copy 42 #include <sys/acl.h> 56 acl_t acl; local in function:acl_init 67 error = posix_memalign((void *)&acl, 1 << _ACL_T_ALIGNMENT_BITS, 74 bzero(acl, sizeof(struct acl_t_struct)); 75 acl->ats_brand = ACL_BRAND_UNKNOWN; 76 acl->ats_acl.acl_maxcnt = ACL_MAX_ENTRIES; 78 return (acl); 82 acl_dup(acl_t acl) [all...] |
acl_delete_entry.c | 38 #include <sys/acl.h> 51 * user or group. In NFSv4 ACL, there may be any number of them. We're 76 * acl_delete_entry() (23.4.9): remove the ACL entry indicated by entry_d 77 * from acl. 80 acl_delete_entry(acl_t acl, acl_entry_t entry_d) 86 if (acl == NULL || entry_d == NULL) { 91 if (_entry_brand(entry_d) != _acl_brand(acl)) { 96 if ((acl->ats_acl.acl_cnt < 1) || 97 (acl->ats_acl.acl_cnt > ACL_MAX_ENTRIES)) { 105 for (i = 0; i < acl->ats_acl.acl_cnt;) [all...] |
acl_set.c | 31 * acl_set_file -- set a file/directory ACL by name 43 #include <sys/acl.h> 54 * (the POSIX.1e semantic code will reject unsorted ACL submission). If it's 59 acl_set_file(const char *path_p, acl_type_t type, acl_t acl) 62 if (acl == NULL || path_p == NULL) { 67 if (_acl_type_not_valid_for_acl(acl, type)) { 71 if (_posix1e_acl(acl, type)) 72 _posix1e_acl_sort(acl); 74 acl->ats_cur_entry = 0; 76 return (__acl_set_file(path_p, type, &acl->ats_acl)) [all...] |
acl_support.h | 31 * Support functionality for the POSIX.1e ACL interface 42 int _acl_type_not_valid_for_acl(const acl_t acl, acl_type_t type); 43 void _acl_brand_from_type(acl_t acl, acl_type_t type); 44 int _acl_brand(const acl_t acl); 46 int _acl_brand_may_be(const acl_t acl, int brand); 48 void _acl_brand_as(acl_t acl, int brand); 56 int _posix1e_acl_check(acl_t acl); 57 void _posix1e_acl_sort(acl_t acl); 58 int _posix1e_acl(acl_t acl, acl_type_t type); 64 int _posix1e_acl_add_entry(acl_t acl, acl_tag_t tag, uid_t id [all...] |
acl_entry.c | 38 #include <sys/acl.h> 44 * acl_create_entry() (23.4.7): create a new ACL entry in the ACL pointed 50 struct acl *acl_int; 85 struct acl *acl_int; 124 * acl_get_entry() (23.4.14): returns an ACL entry from an ACL 128 acl_get_entry(acl_t acl, int entry_id, acl_entry_t *entry_p) 130 struct acl *acl_int; 132 if (acl == NULL) [all...] |
acl_from_text.c | 29 * acl_from_text: Convert a text-form ACL from a string to an acl_t. 41 #include <sys/acl.h> 189 * acl_from_text -- Convert a string into an ACL. 196 acl_t acl; local in function:acl_from_text 205 acl = acl_init(3); /* XXX: WTF, 3? */ 206 if (acl == NULL) { 225 if (_acl_brand(acl) == ACL_BRAND_UNKNOWN) { 227 _acl_brand_as(acl, ACL_BRAND_NFS4); 229 _acl_brand_as(acl, ACL_BRAND_POSIX); 232 switch (_acl_brand(acl)) { [all...] |
acl_free.c | 29 * acl_free -- free ACL objects from user memory 41 #include <sys/acl.h> 47 * ACL data object identified by obj_p.
|
acl_copy.c | 38 #include <sys/acl.h> 46 * acl_copy_entry() (23.4.4): copy the contents of ACL entry src_d to 47 * ACL entry dest_d 79 acl_copy_ext(void *buf_p, acl_t acl, ssize_t size)
|
acl_support.c | 29 * Support functionality for the POSIX.1e ACL interface 42 #include <sys/acl.h> 92 * sort ACL entries into the kernel-desired order -- i.e., the order useful 135 * _posix1e_acl_sort -- sort ACL entries in POSIX.1e-formatted ACLs. 138 _posix1e_acl_sort(acl_t acl) 140 struct acl *acl_int; 142 acl_int = &acl->ats_acl; 150 * We apply posix1e ACL semantics for any ACL of type ACL_TYPE_ACCESS or 154 _posix1e_acl(acl_t acl, acl_type_t type [all...] |
acl_to_text.c | 29 * acl_to_text - return a text string with a text representation of the acl 42 #include <sys/acl.h> 51 * acl_to_text - generate a text form of an acl 52 * spec says nothing about output ordering, so leave in acl order 55 * a non-POSIX.1e semantics ACL. 58 char *_nfs4_acl_to_text_np(const acl_t acl, ssize_t *len_p, int flags); 61 _posix1e_acl_to_text(acl_t acl, ssize_t *len_p, int flags) 63 struct acl *acl_int; 78 acl_int = &acl->ats_acl; 243 acl_to_text_np(acl_t acl, ssize_t *len_p, int flags [all...] |
/src/bin/setfacl/ |
mask.c | 37 #include <sys/acl.h> 47 /* set the appropriate mask the given ACL's */ 52 acl_t acl; local in function:set_acl_mask 60 * entry in the resulting ACL shall be set to the permissions in the 61 * specified ACL mask entry. 66 acl = acl_dup(*prev_acl); 67 if (acl == NULL) 73 * specified, then the permissions of the resulting ACL mask 76 * class in the resulting ACL 78 if (acl_calc_mask(&acl)) { [all...] |
setfacl.h | 37 #include <sys/acl.h> 43 int merge_acl(acl_t acl, acl_t *prev_acl, const char *filename); 44 int add_acl(acl_t acl, uint entry_number, acl_t *prev_acl, 47 int remove_acl(acl_t acl, acl_t *prev_acl, const char *filename);
|
setfacl.c | 37 #include <sys/acl.h> 53 #define OP_MERGE_ACL 0x00 /* merge acl's (-mM) */ 54 #define OP_REMOVE_DEF 0x01 /* remove default acl's (-k) */ 55 #define OP_REMOVE_EXT 0x02 /* remove extended acl's (-b) */ 56 #define OP_REMOVE_ACL 0x03 /* remove acl's (-xX) */ 57 #define OP_REMOVE_BY_NUMBER 0x04 /* remove acl's (-xX) by acl entry number */ 60 /* TAILQ entry for acl operations */ 63 acl_t acl; member in struct:sf_entry 80 static acl_t clear_inheritance_flags(acl_t acl); 182 acl_t acl, nacl; local in function:handle_file [all...] |
/src/sys/ufs/ufs/ |
acl.h | 30 * $FreeBSD: head/sys/ufs/ufs/acl.h 326272 2017-11-27 15:23:17Z pfg $ 43 int ufs_getacl_nfs4_internal(struct vnode *vp, struct acl *aclp, struct lwp *l); 44 int ufs_setacl_nfs4_internal(struct vnode *vp, struct acl *aclp, struct lwp *l, bool lock); 45 int ufs_setacl_posix1e(struct vnode *vp, int type, struct acl *aclp, 47 void ufs_sync_acl_from_inode(struct inode *ip, struct acl *acl); 48 void ufs_sync_inode_from_acl(struct acl *acl, struct inode *ip);
|
ufs_acl.c | 54 #include <sys/acl.h> 61 #include <ufs/ufs/acl.h> 73 * Synchronize an ACL and an inode by copying over appropriate inode fields 74 * to the passed ACL. Assumes an ACL that would satisfy acl_posix1e_check(), 78 ufs_sync_acl_from_inode(struct inode *ip, struct acl *acl) 90 for (i = 0; i < acl->acl_cnt; i++) { 91 switch (acl->acl_entry[i].ae_tag) { 93 acl->acl_entry[i].ae_perm = acl_posix1e_mode_to_perm [all...] |
/src/sys/net80211/ |
ieee80211_acl.c | 41 * IEEE 802.11 MAC ACL support. 67 ACL_POLICY_OPEN = 0, /* open, don't check ACL's */ 74 struct acl { struct 75 TAILQ_ENTRY(acl) acl_list; 76 LIST_ENTRY(acl) acl_hash; 83 TAILQ_HEAD(, acl) as_list; /* list of all ACL's */ 84 LIST_HEAD(, acl) as_hash[ACL_HASHSIZE]; 92 MALLOC_DEFINE(M_80211_ACL, "acl", "802.11 station acl"); 125 struct acl *acl; local in function:_find_acl 167 struct acl *acl, *new; local in function:acl_add 199 struct acl *acl; local in function:acl_remove 218 struct acl *acl; local in function:acl_free_all 274 struct acl *acl; local in function:acl_getioctl [all...] |
/src/sys/sys/ |
acl.h | 31 * $FreeBSD: head/sys/sys/acl.h 326256 2017-11-27 15:01:59Z pfg $ 45 * POSIX.1e and NFSv4 ACL types and related constants. 58 * Note that with NFSv4 ACLs, the maximum number of ACL entries one 66 * compatibility with pre-8.0 userland and change on-disk ACL layout. 77 #define NFS4_ACL_EXTATTR_NAME "nfs4.acl" 81 * "struct oldacl" is used in compatibility ACL syscalls and for on-disk 100 * Current "struct acl". 108 /* NFSv4 ACL inheritance. Unused in POSIX.1e ACLs. */ 114 * Internal ACL structure, used in libc, kernel APIs and for on-disk 118 struct acl { struct [all...] |
/src/bin/getfacl/ |
getfacl.c | 45 #include <sys/acl.h> 94 * return an ACL corresponding to the permissions 100 acl_t acl; local in function:acl_from_stat 104 /* create the ACL */ 105 acl = acl_init(3); 106 if (!acl) 110 if (acl_create_entry(&acl, &entry) == -1) 134 if (acl_create_entry(&acl, &entry) == -1) 158 if (acl_create_entry(&acl, &entry) == -1) 181 return(acl); 189 acl_t acl; local in function:print_acl [all...] |
/src/sys/kern/ |
subr_acl_posix1e.c | 33 * ACL support routines specific to POSIX.1e access control lists. These are 53 #include <sys/acl.h> 100 * Given inode information (uid, gid, mode), return an acl entry of the 134 * Utility function to generate a file mode given appropriate ACL entries. 167 * ACL. Note that if the ACL is improperly formed, this may result in a 171 acl_posix1e_acl_to_mode(struct acl *acl) 177 * Find the ACL entries relevant to a POSIX permission mode. 180 for (i = 0; i < acl->acl_cnt; i++) [all...] |
subr_acl_nfs4.c | 30 * ACL support routines specific to NFSv4 access control lists. These are 51 #include <sys/acl.h> 54 static void acl_nfs4_trivial_from_mode(struct acl *aclp, mode_t mode); 61 #include <sys/acl.h> 92 _acl_append(struct acl *aclp, acl_tag_t tag, acl_perm_t perm, 113 _acl_duplicate_entry(struct acl *aclp, unsigned int entry_index) 131 acl_nfs4_sync_acl_from_mode(struct acl *aclp, mode_t mode, 140 __acl_nfs4_sync_mode_from_acl(mode_t *_mode, const struct acl *aclp) 151 * 3.16.6.1. Recomputing mode upon SETATTR of ACL 261 * Populate the ACL with entries inherited from parent_aclp [all...] |
vfs_acl.c | 40 * ACL system calls and other functions common across different ACL types. 53 #include <sys/acl.h> 71 acl_copy_oldacl_into_acl(const struct oldacl *source, struct acl *dest) 93 acl_copy_acl_into_oldacl(const struct acl *source, struct oldacl *dest) 114 * At one time, "struct ACL" was extended in order to add support for NFSv4 115 * ACLs. Instead of creating compatibility versions of all the ACL-related 120 * oldacl". If it's something else, then it's the new "struct acl". In the 126 acl_copyin(const void *user_acl, struct acl *kernel_acl, acl_type_t type) 150 acl_copyout(const struct acl *kernel_acl, void *user_acl, acl_type_t type [all...] |
/src/bin/cp/ |
utils.c | 47 #include <sys/acl.h> 419 acl_t acl; local in function:preserve_fd_acls 445 acl = acl_get_fd_np(source_fd, acl_type); 446 if (acl == NULL) { 447 warn("failed to get acl entries while setting %s", to.p_path); 450 if (acl_is_trivial_np(acl, &trivial)) { 452 acl_free(acl); 456 acl_free(acl); 459 if (acl_set_fd_np(dest_fd, acl, acl_type) < 0) { 460 warn("failed to set acl entries for %s", to.p_path) 474 acl_t acl; local in function:preserve_dir_acls [all...] |
/src/sys/rump/include/rump/ |
rumpvnode_if.h | 49 struct acl; 51 #include <sys/acl.h> 109 int RUMP_VOP_GETACL(struct vnode *, acl_type_t, struct acl *, 111 int RUMP_VOP_SETACL(struct vnode *, acl_type_t, struct acl *, 113 int RUMP_VOP_ACLCHECK(struct vnode *, acl_type_t, struct acl *,
|