| /NextBSD/contrib/unbound/daemon/ |
| HD | acl_list.c | 52 struct acl_list* acl = (struct acl_list*)calloc(1, in acl_list_create() local 54 if(!acl) in acl_list_create() 56 acl->region = regional_create(); in acl_list_create() 57 if(!acl->region) { in acl_list_create() 58 acl_list_delete(acl); in acl_list_create() 61 return acl; in acl_list_create() 65 acl_list_delete(struct acl_list* acl) in acl_list_delete() argument 67 if(!acl) in acl_list_delete() 69 regional_destroy(acl->region); in acl_list_delete() 70 free(acl); in acl_list_delete() [all …]
|
| /NextBSD/crypto/heimdal/lib/krb5/ |
| HD | acl.c | 47 free_retv(struct acl_field *acl) in free_retv() argument 49 while(acl != NULL) { in free_retv() 50 if (acl->type == acl_retval) { in free_retv() 51 if (*acl->u.retv) in free_retv() 52 free(*acl->u.retv); in free_retv() 53 *acl->u.retv = NULL; in free_retv() 55 acl = acl->next; in free_retv() 60 acl_free_list(struct acl_field *acl, int retv) in acl_free_list() argument 64 free_retv(acl); in acl_free_list() 65 while(acl != NULL) { in acl_free_list() [all …]
|
| /NextBSD/lib/libc/posix1e/ |
| HD | acl_delete_entry.c | 75 acl_delete_entry(acl_t acl, acl_entry_t entry_d) in acl_delete_entry() argument 77 struct acl *acl_int; in acl_delete_entry() 81 if (acl == NULL || entry_d == NULL) { in acl_delete_entry() 86 acl_int = &acl->ats_acl; in acl_delete_entry() 88 if (_entry_brand(entry_d) != _acl_brand(acl)) { in acl_delete_entry() 93 if ((acl->ats_acl.acl_cnt < 1) || in acl_delete_entry() 94 (acl->ats_acl.acl_cnt > ACL_MAX_ENTRIES)) { in acl_delete_entry() 102 for (i = 0; i < acl->ats_acl.acl_cnt;) { in acl_delete_entry() 103 if (_entry_matches(&(acl->ats_acl.acl_entry[i]), &entry_int)) { in acl_delete_entry() 105 for (j = i; j < acl->ats_acl.acl_cnt - 1; ++j) in acl_delete_entry() [all …]
|
| HD | acl_valid.c | 57 acl_valid(acl_t acl) in acl_valid() argument 61 if (acl == NULL) { in acl_valid() 65 if (!_acl_brand_may_be(acl, ACL_BRAND_POSIX)) { in acl_valid() 69 _posix1e_acl_sort(acl); in acl_valid() 70 error = _posix1e_acl_check(acl); in acl_valid() 80 acl_valid_file_np(const char *pathp, acl_type_t type, acl_t acl) in acl_valid_file_np() argument 83 if (pathp == NULL || acl == NULL) { in acl_valid_file_np() 88 if (_posix1e_acl(acl, type)) in acl_valid_file_np() 89 _posix1e_acl_sort(acl); in acl_valid_file_np() 91 return (__acl_aclcheck_file(pathp, type, &acl->ats_acl)); in acl_valid_file_np() [all …]
|
| HD | acl_set.c | 54 acl_set_file(const char *path_p, acl_type_t type, acl_t acl) in acl_set_file() argument 57 if (acl == NULL || path_p == NULL) { in acl_set_file() 62 if (_acl_type_not_valid_for_acl(acl, type)) { in acl_set_file() 66 if (_posix1e_acl(acl, type)) in acl_set_file() 67 _posix1e_acl_sort(acl); in acl_set_file() 69 acl->ats_cur_entry = 0; in acl_set_file() 71 return (__acl_set_file(path_p, type, &acl->ats_acl)); in acl_set_file() 75 acl_set_link_np(const char *path_p, acl_type_t type, acl_t acl) in acl_set_link_np() argument 78 if (acl == NULL || path_p == NULL) { in acl_set_link_np() 83 if (_acl_type_not_valid_for_acl(acl, type)) { in acl_set_link_np() [all …]
|
| HD | acl_branding.c | 63 _acl_brand(const acl_t acl) in _acl_brand() argument 66 return (acl->ats_brand); in _acl_brand() 80 _acl_brand_may_be(const acl_t acl, int brand) in _acl_brand_may_be() argument 83 if (_acl_brand(acl) == ACL_BRAND_UNKNOWN) in _acl_brand_may_be() 86 if (_acl_brand(acl) == brand) in _acl_brand_may_be() 103 _acl_brand_as(acl_t acl, int brand) in _acl_brand_as() argument 106 assert(_acl_brand_may_be(acl, brand)); in _acl_brand_as() 108 acl->ats_brand = brand; in _acl_brand_as() 119 _acl_type_not_valid_for_acl(const acl_t acl, acl_type_t type) in _acl_type_not_valid_for_acl() argument 122 switch (_acl_brand(acl)) { in _acl_type_not_valid_for_acl() [all …]
|
| HD | acl_init.c | 57 acl_t acl; in acl_init() local 68 error = posix_memalign((void *)&acl, 1 << _ACL_T_ALIGNMENT_BITS, in acl_init() 75 bzero(acl, sizeof(struct acl_t_struct)); in acl_init() 76 acl->ats_brand = ACL_BRAND_UNKNOWN; in acl_init() 77 acl->ats_acl.acl_maxcnt = ACL_MAX_ENTRIES; in acl_init() 78 acl->ats_acl.acl_cnt = count; in acl_init() 80 return (acl); in acl_init() 84 acl_dup(acl_t acl) in acl_dup() argument 90 *acl_new = *acl; in acl_dup() 91 acl->ats_cur_entry = 0; in acl_dup()
|
| HD | acl_entry.c | 45 struct acl *acl_int; in acl_create_entry() 80 struct acl *acl_int; in acl_create_entry_np() 123 acl_get_entry(acl_t acl, int entry_id, acl_entry_t *entry_p) in acl_get_entry() argument 125 struct acl *acl_int; in acl_get_entry() 127 if (acl == NULL) { in acl_get_entry() 131 acl_int = &acl->ats_acl; in acl_get_entry() 135 acl->ats_cur_entry = 0; in acl_get_entry() 138 if (acl->ats_cur_entry >= acl->ats_acl.acl_cnt) in acl_get_entry() 140 *entry_p = &acl_int->acl_entry[acl->ats_cur_entry++]; in acl_get_entry()
|
| HD | acl_support.h | 40 int _acl_type_not_valid_for_acl(const acl_t acl, acl_type_t type); 41 void _acl_brand_from_type(acl_t acl, acl_type_t type); 42 int _acl_brand(const acl_t acl); 44 int _acl_brand_may_be(const acl_t acl, int brand); 46 void _acl_brand_as(acl_t acl, int brand); 54 int _posix1e_acl_check(acl_t acl); 55 void _posix1e_acl_sort(acl_t acl); 56 int _posix1e_acl(acl_t acl, acl_type_t type); 62 int _posix1e_acl_add_entry(acl_t acl, acl_tag_t tag, uid_t id,
|
| HD | acl_from_text.c | 194 acl_t acl; in acl_from_text() local 203 acl = acl_init(3); /* XXX: WTF, 3? */ in acl_from_text() 204 if (acl == NULL) { in acl_from_text() 223 if (_acl_brand(acl) == ACL_BRAND_UNKNOWN) { in acl_from_text() 225 _acl_brand_as(acl, ACL_BRAND_NFS4); in acl_from_text() 227 _acl_brand_as(acl, ACL_BRAND_POSIX); in acl_from_text() 230 switch (_acl_brand(acl)) { in acl_from_text() 232 error = _nfs4_acl_entry_from_text(acl, entry); in acl_from_text() 236 error = _posix1e_acl_entry_from_text(acl, entry); in acl_from_text() 252 if (acl_valid(acl) == -1) { in acl_from_text() [all …]
|
| HD | acl_to_text.c | 53 char *_nfs4_acl_to_text_np(const acl_t acl, ssize_t *len_p, int flags); 56 _posix1e_acl_to_text(acl_t acl, ssize_t *len_p, int flags) in _posix1e_acl_to_text() argument 58 struct acl *acl_int; in _posix1e_acl_to_text() 72 acl_int = &acl->ats_acl; in _posix1e_acl_to_text() 237 acl_to_text_np(acl_t acl, ssize_t *len_p, int flags) in acl_to_text_np() argument 240 if (acl == NULL) { in acl_to_text_np() 245 switch (_acl_brand(acl)) { in acl_to_text_np() 247 return (_posix1e_acl_to_text(acl, len_p, flags)); in acl_to_text_np() 249 return (_nfs4_acl_to_text_np(acl, len_p, flags)); in acl_to_text_np() 257 acl_to_text(acl_t acl, ssize_t *len_p) in acl_to_text() argument [all …]
|
| HD | acl_support.c | 133 _posix1e_acl_sort(acl_t acl) in _posix1e_acl_sort() argument 135 struct acl *acl_int; in _posix1e_acl_sort() 137 acl_int = &acl->ats_acl; in _posix1e_acl_sort() 149 _posix1e_acl(acl_t acl, acl_type_t type) in _posix1e_acl() argument 152 if (_acl_brand(acl) != ACL_BRAND_POSIX) in _posix1e_acl() 173 _posix1e_acl_check(acl_t acl) in _posix1e_acl_check() argument 175 struct acl *acl_int; in _posix1e_acl_check() 183 acl_int = &acl->ats_acl; in _posix1e_acl_check() 347 _posix1e_acl_add_entry(acl_t acl, acl_tag_t tag, uid_t id, acl_perm_t perm) in _posix1e_acl_add_entry() argument 349 struct acl *acl_int; in _posix1e_acl_add_entry() [all …]
|
| /NextBSD/sys/kern/ |
| HD | subr_acl_posix1e.c | 58 struct acl *acl, accmode_t accmode, struct ucred *cred, int *privused) in vaccess_acl_posix1e() argument 100 if ((accmode & VEXEC) && (acl_posix1e_acl_to_mode(acl) & in vaccess_acl_posix1e() 123 for (i = 0; i < acl->acl_cnt; i++) { in vaccess_acl_posix1e() 124 switch (acl->acl_entry[i].ae_tag) { in vaccess_acl_posix1e() 130 if (acl->acl_entry[i].ae_perm & ACL_EXECUTE) in vaccess_acl_posix1e() 132 if (acl->acl_entry[i].ae_perm & ACL_READ) in vaccess_acl_posix1e() 134 if (acl->acl_entry[i].ae_perm & ACL_WRITE) in vaccess_acl_posix1e() 151 acl_mask = &acl->acl_entry[i]; in vaccess_acl_posix1e() 155 acl_other = &acl->acl_entry[i]; in vaccess_acl_posix1e() 200 for (i = 0; i < acl->acl_cnt; i++) { in vaccess_acl_posix1e() [all …]
|
| /NextBSD/sys/net80211/ |
| HD | ieee80211_acl.c | 72 struct acl { struct 73 TAILQ_ENTRY(acl) acl_list; 74 LIST_ENTRY(acl) acl_hash; 81 TAILQ_HEAD(, acl) as_list; /* list of all ACL's */ 82 LIST_HEAD(, acl) as_hash[ACL_HASHSIZE]; 129 static __inline struct acl * 132 struct acl *acl; in _find_acl() local 136 LIST_FOREACH(acl, &as->as_hash[hash], acl_hash) { in _find_acl() 137 if (IEEE80211_ADDR_EQ(acl->acl_macaddr, macaddr)) in _find_acl() 138 return acl; in _find_acl() [all …]
|
| /NextBSD/contrib/libarchive/libarchive/ |
| HD | archive_acl.c | 51 static int acl_special(struct archive_acl *acl, 53 static struct archive_acl_entry *acl_new_entry(struct archive_acl *acl, 55 static int archive_acl_add_entry_len_l(struct archive_acl *acl, 78 archive_acl_clear(struct archive_acl *acl) in archive_acl_clear() argument 82 while (acl->acl_head != NULL) { in archive_acl_clear() 83 ap = acl->acl_head->next; in archive_acl_clear() 84 archive_mstring_clean(&acl->acl_head->name); in archive_acl_clear() 85 free(acl->acl_head); in archive_acl_clear() 86 acl->acl_head = ap; in archive_acl_clear() 88 if (acl->acl_text_w != NULL) { in archive_acl_clear() [all …]
|
| /NextBSD/bin/setfacl/ |
| HD | setfacl.c | 56 acl_t acl; member 103 acl_t acl; in main() local 126 entry->acl = get_acl_from_file(optarg); in main() 127 if (entry->acl == NULL) in main() 134 entry->acl = get_acl_from_file(optarg); in main() 150 entry->acl = acl_from_text(argv[optind]); in main() 151 if (entry->acl == NULL) in main() 175 entry->acl = acl_from_text(optarg); in main() 176 if (entry->acl == NULL) in main() 193 entry->acl = acl_from_text(optarg); in main() [all …]
|
| HD | mask.c | 46 acl_t acl; in set_acl_mask() local 60 acl = acl_dup(*prev_acl); in set_acl_mask() 61 if (acl == NULL) in set_acl_mask() 72 if (acl_calc_mask(&acl)) { in set_acl_mask() 74 acl_free(acl); in set_acl_mask() 86 while (acl_get_entry(acl, entry_id, &entry) == 1) { in set_acl_mask() 93 acl_free(acl); in set_acl_mask() 105 acl_free(acl); in set_acl_mask() 110 *prev_acl = acl_dup(acl); in set_acl_mask() 111 acl_free(acl); in set_acl_mask()
|
| /NextBSD/contrib/bsnmp/snmp_vacm/ |
| HD | vacm_snmp.c | 267 struct vacm_access *acl; in op_vacm_access() local 271 if ((acl = vacm_get_access_rule(&val->var, sub)) == NULL) in op_vacm_access() 276 if ((acl = vacm_get_next_access_rule(&val->var, sub)) == NULL) in op_vacm_access() 278 vacm_append_access_rule_index(&val->var, sub, acl); in op_vacm_access() 282 if ((acl = vacm_get_access_rule(&val->var, sub)) == NULL && in op_vacm_access() 285 if (acl != NULL && community != COMM_INITIALIZE && in op_vacm_access() 286 acl->type == StorageType_readOnly) in op_vacm_access() 291 ctx->scratch->int1 = acl->ctx_match; in op_vacm_access() 293 acl->ctx_match = 1; in op_vacm_access() 295 acl->ctx_match = 0; in op_vacm_access() [all …]
|
| /NextBSD/sys/sys/ |
| HD | acl.h | 117 struct acl { struct 129 struct acl ats_acl; 294 mode_t acl_posix1e_acl_to_mode(struct acl *acl); 296 struct acl *dacl); 297 struct acl *acl_alloc(int flags); 298 void acl_free(struct acl *aclp); 300 void acl_nfs4_sync_acl_from_mode(struct acl *aclp, 303 const struct acl *aclp); 304 int acl_nfs4_is_trivial(const struct acl *aclp, 307 const struct acl *parent_aclp, [all …]
|
| /NextBSD/bin/cp/ |
| HD | utils.c | 412 acl_t acl; in preserve_fd_acls() local 438 acl = acl_get_fd_np(source_fd, acl_type); in preserve_fd_acls() 439 if (acl == NULL) { in preserve_fd_acls() 443 if (acl_is_trivial_np(acl, &trivial)) { in preserve_fd_acls() 445 acl_free(acl); in preserve_fd_acls() 449 acl_free(acl); in preserve_fd_acls() 452 if (acl_set_fd_np(dest_fd, acl, acl_type) < 0) { in preserve_fd_acls() 454 acl_free(acl); in preserve_fd_acls() 457 acl_free(acl); in preserve_fd_acls() 466 struct acl *aclp; in preserve_dir_acls() [all …]
|
| /NextBSD/bin/getfacl/ |
| HD | getfacl.c | 93 acl_t acl; in acl_from_stat() local 98 acl = acl_init(3); in acl_from_stat() 99 if (!acl) in acl_from_stat() 103 if (acl_create_entry(&acl, &entry) == -1) in acl_from_stat() 127 if (acl_create_entry(&acl, &entry) == -1) in acl_from_stat() 151 if (acl_create_entry(&acl, &entry) == -1) in acl_from_stat() 174 return(acl); in acl_from_stat() 182 acl_t acl; in print_acl() local 221 acl = acl_get_link_np(path, type); in print_acl() 223 acl = acl_get_file(path, type); in print_acl() [all …]
|
| /NextBSD/contrib/libarchive/libarchive/test/ |
| HD | test_acl_freebsd_posix1e.c | 131 compare_acls(acl_t acl, struct myacl_t *myacls) in compare_acls() argument 155 while (1 == acl_get_entry(acl, entry_id, &acl_entry)) { in compare_acls() 204 acl_t acl; in DEFINE_TEST() 211 acl = acl_from_text("u::rwx,u:1:rw,g::rwx,g:15:rx,o::rwx,m::rwx"); in DEFINE_TEST() 212 assert((void *)acl != NULL); in DEFINE_TEST() 217 acl_free(acl); in DEFINE_TEST() 221 n = acl_set_fd(fd, acl); in DEFINE_TEST() 222 acl_free(acl); in DEFINE_TEST() 260 acl = acl_get_file("test0", ACL_TYPE_ACCESS); in DEFINE_TEST() 261 assert(acl != (acl_t)NULL); in DEFINE_TEST() [all …]
|
| HD | test_acl_freebsd_nfs4.c | 294 compare_acls(acl_t acl, struct myacl_t *myacls, const char *filename, int start, int end) in compare_acls() argument 316 while (1 == acl_get_entry(acl, entry_id, &acl_entry)) { in compare_acls() 424 acl_t acl; in DEFINE_TEST() 431 acl = acl_from_text("owner@:rwxp::allow,group@:rwp:f:allow"); in DEFINE_TEST() 432 assert((void *)acl != NULL); in DEFINE_TEST() 435 acl_free(acl); in DEFINE_TEST() 439 n = acl_set_file("pretest", ACL_TYPE_NFS4, acl); in DEFINE_TEST() 440 acl_free(acl); in DEFINE_TEST() 499 acl = acl_get_file("testall", ACL_TYPE_NFS4); in DEFINE_TEST() 500 assert(acl != (acl_t)NULL); in DEFINE_TEST() [all …]
|
| /NextBSD/sys/ufs/ufs/ |
| HD | acl.h | 40 int ufs_getacl_nfs4_internal(struct vnode *vp, struct acl *aclp, struct thread *td); 41 int ufs_setacl_nfs4_internal(struct vnode *vp, struct acl *aclp, struct thread *td); 42 void ufs_sync_acl_from_inode(struct inode *ip, struct acl *acl); 43 void ufs_sync_inode_from_acl(struct acl *acl, struct inode *ip);
|
| /NextBSD/sys/cddl/contrib/opensolaris/common/acl/ |
| HD | acl_common.c | 1274 ace_list_t *normacl = NULL, *dfacl = NULL, *acl; in ln_ace_to_aent() local 1343 acl = dfacl; in ln_ace_to_aent() 1345 acl = normacl; in ln_ace_to_aent() 1349 if (acl->state > ace_user_obj) { in ln_ace_to_aent() 1353 acl->state = ace_user_obj; in ln_ace_to_aent() 1354 acl->seen |= USER_OBJ; in ln_ace_to_aent() 1355 vals = &acl->user_obj; in ln_ace_to_aent() 1356 vals->aent_type = USER_OBJ | acl->dfacl_flag; in ln_ace_to_aent() 1358 acl->state = ace_other_obj; in ln_ace_to_aent() 1359 acl->seen |= OTHER_OBJ; in ln_ace_to_aent() [all …]
|