/freebsd/crypto/heimdal/lib/krb5/ |
H A D | 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 …]
|
/freebsd/lib/libc/posix1e/ |
H A D | acl_delete_entry.c | 74 acl_delete_entry(acl_t acl, acl_entry_t entry_d) in acl_delete_entry() argument 79 if (acl == NULL || entry_d == NULL) { in acl_delete_entry() 84 if (_entry_brand(entry_d) != _acl_brand(acl)) { in acl_delete_entry() 89 if ((acl->ats_acl.acl_cnt < 1) || in acl_delete_entry() 90 (acl->ats_acl.acl_cnt > ACL_MAX_ENTRIES)) { in acl_delete_entry() 98 for (i = 0; i < acl->ats_acl.acl_cnt;) { in acl_delete_entry() 99 if (_entry_matches(&(acl->ats_acl.acl_entry[i]), &entry_int)) { in acl_delete_entry() 101 for (j = i; j < acl->ats_acl.acl_cnt - 1; ++j) in acl_delete_entry() 102 acl->ats_acl.acl_entry[j] = in acl_delete_entry() 103 acl->ats_acl.acl_entry[j+1]; in acl_delete_entry() [all …]
|
H A D | acl_valid.c | 56 acl_valid(acl_t acl) in acl_valid() argument 60 if (acl == NULL) { in acl_valid() 64 if (!_acl_brand_may_be(acl, ACL_BRAND_POSIX)) { in acl_valid() 68 _posix1e_acl_sort(acl); in acl_valid() 69 error = _posix1e_acl_check(acl); in acl_valid() 79 acl_valid_file_np(const char *pathp, acl_type_t type, acl_t acl) in acl_valid_file_np() argument 82 if (pathp == NULL || acl == NULL) { in acl_valid_file_np() 87 if (_posix1e_acl(acl, type)) in acl_valid_file_np() 88 _posix1e_acl_sort(acl); in acl_valid_file_np() 90 return (__acl_aclcheck_file(pathp, type, &acl->ats_acl)); in acl_valid_file_np() [all …]
|
H A D | acl_set.c | 53 acl_set_file(const char *path_p, acl_type_t type, acl_t acl) in acl_set_file() argument 56 if (acl == NULL || path_p == NULL) { in acl_set_file() 61 if (_acl_type_not_valid_for_acl(acl, type)) { in acl_set_file() 65 if (_posix1e_acl(acl, type)) in acl_set_file() 66 _posix1e_acl_sort(acl); in acl_set_file() 68 acl->ats_cur_entry = 0; in acl_set_file() 70 return (__acl_set_file(path_p, type, &acl->ats_acl)); in acl_set_file() 74 acl_set_link_np(const char *path_p, acl_type_t type, acl_t acl) in acl_set_link_np() argument 77 if (acl == NULL || path_p == NULL) { in acl_set_link_np() 82 if (_acl_type_not_valid_for_acl(acl, type)) { in acl_set_link_np() [all …]
|
H A D | acl_branding.c | 61 _acl_brand(const acl_t acl) in _acl_brand() argument 64 return (acl->ats_brand); in _acl_brand() 78 _acl_brand_may_be(const acl_t acl, int brand) in _acl_brand_may_be() argument 81 if (_acl_brand(acl) == ACL_BRAND_UNKNOWN) in _acl_brand_may_be() 84 if (_acl_brand(acl) == brand) in _acl_brand_may_be() 101 _acl_brand_as(acl_t acl, int brand) in _acl_brand_as() argument 104 assert(_acl_brand_may_be(acl, brand)); in _acl_brand_as() 106 acl->ats_brand = brand; in _acl_brand_as() 117 _acl_type_not_valid_for_acl(const acl_t acl, acl_type_t type) in _acl_type_not_valid_for_acl() argument 120 switch (_acl_brand(acl)) { in _acl_type_not_valid_for_acl() [all …]
|
H A D | acl_init.c | 56 acl_t acl; in acl_init() local 67 error = posix_memalign((void *)&acl, 1 << _ACL_T_ALIGNMENT_BITS, in acl_init() 74 bzero(acl, sizeof(struct acl_t_struct)); in acl_init() 75 acl->ats_brand = ACL_BRAND_UNKNOWN; in acl_init() 76 acl->ats_acl.acl_maxcnt = ACL_MAX_ENTRIES; in acl_init() 78 return (acl); in acl_init() 82 acl_dup(acl_t acl) in acl_dup() argument 88 *acl_new = *acl; in acl_dup() 89 acl->ats_cur_entry = 0; in acl_dup()
|
H A D | acl_entry.c | 44 struct acl *acl_int; in acl_create_entry() 79 struct acl *acl_int; in acl_create_entry_np() 122 acl_get_entry(acl_t acl, int entry_id, acl_entry_t *entry_p) in acl_get_entry() argument 124 struct acl *acl_int; in acl_get_entry() 126 if (acl == NULL) { in acl_get_entry() 130 acl_int = &acl->ats_acl; in acl_get_entry() 134 acl->ats_cur_entry = 0; in acl_get_entry() 137 if (acl->ats_cur_entry >= acl->ats_acl.acl_cnt) in acl_get_entry() 139 *entry_p = &acl_int->acl_entry[acl->ats_cur_entry++]; in acl_get_entry()
|
H A D | 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,
|
H A D | acl_from_text.c | 193 acl_t acl; in acl_from_text() local 202 acl = acl_init(3); /* XXX: WTF, 3? */ in acl_from_text() 203 if (acl == NULL) { in acl_from_text() 222 if (_acl_brand(acl) == ACL_BRAND_UNKNOWN) { in acl_from_text() 224 _acl_brand_as(acl, ACL_BRAND_NFS4); in acl_from_text() 226 _acl_brand_as(acl, ACL_BRAND_POSIX); in acl_from_text() 229 switch (_acl_brand(acl)) { in acl_from_text() 231 error = _nfs4_acl_entry_from_text(acl, entry); in acl_from_text() 235 error = _posix1e_acl_entry_from_text(acl, entry); in acl_from_text() 251 if (acl_valid(acl) == -1) { in acl_from_text() [all …]
|
/freebsd/sys/kern/ |
H A D | subr_acl_posix1e.c | 57 struct acl *acl, accmode_t accmode, struct ucred *cred) in vaccess_acl_posix1e() argument 96 if ((accmode & VEXEC) && (acl_posix1e_acl_to_mode(acl) & in vaccess_acl_posix1e() 119 for (i = 0; i < acl->acl_cnt; i++) { in vaccess_acl_posix1e() 120 switch (acl->acl_entry[i].ae_tag) { in vaccess_acl_posix1e() 126 if (acl->acl_entry[i].ae_perm & ACL_EXECUTE) in vaccess_acl_posix1e() 128 if (acl->acl_entry[i].ae_perm & ACL_READ) in vaccess_acl_posix1e() 130 if (acl->acl_entry[i].ae_perm & ACL_WRITE) in vaccess_acl_posix1e() 145 acl_mask = &acl->acl_entry[i]; in vaccess_acl_posix1e() 149 acl_other = &acl->acl_entry[i]; in vaccess_acl_posix1e() 194 for (i = 0; i < acl->acl_cnt; i++) { in vaccess_acl_posix1e() [all …]
|
/freebsd/sys/net80211/ |
H A D | ieee80211_acl.c | 73 struct acl { struct 74 TAILQ_ENTRY(acl) acl_list; 75 LIST_ENTRY(acl) acl_hash; 82 TAILQ_HEAD(, acl) as_list; /* list of all ACL's */ 83 LIST_HEAD(, acl) as_hash[ACL_HASHSIZE]; 130 static __inline struct acl * 133 struct acl *acl; in _find_acl() local 137 LIST_FOREACH(acl, &as->as_hash[hash], acl_hash) { in _find_acl() 138 if (IEEE80211_ADDR_EQ(acl->acl_macaddr, macaddr)) in _find_acl() 139 return acl; in _find_acl() [all …]
|
/freebsd/contrib/unbound/daemon/ |
H A D | acl_list.c | 55 struct acl_list* acl = (struct acl_list*)calloc(1, in acl_list_create() local 57 if(!acl) in acl_list_create() 59 acl->region = regional_create(); in acl_list_create() 60 if(!acl->region) { in acl_list_create() 61 acl_list_delete(acl); in acl_list_create() 64 return acl; in acl_list_create() 68 acl_list_delete(struct acl_list* acl) in acl_list_delete() argument 70 if(!acl) in acl_list_delete() 72 regional_destroy(acl->region); in acl_list_delete() 73 free(acl); in acl_list_delete() [all …]
|
/freebsd/bin/setfacl/ |
H A D | setfacl.c | 54 acl_t acl; member 71 static acl_t clear_inheritance_flags(acl_t acl); 131 clear_inheritance_flags(acl_t acl) in clear_inheritance_flags() argument 138 (void)acl_get_brand_np(acl, &acl_brand); in clear_inheritance_flags() 140 return (acl); in clear_inheritance_flags() 142 nacl = acl_dup(acl); in clear_inheritance_flags() 145 return (acl); in clear_inheritance_flags() 173 acl_t acl, nacl; in handle_file() local 226 acl = acl_get_file(file->fts_accpath, acl_type); in handle_file() 228 acl = acl_get_link_np(file->fts_accpath, acl_type); in handle_file() [all …]
|
H A D | mask.c | 40 acl_t acl; in set_acl_mask() local 54 acl = acl_dup(*prev_acl); in set_acl_mask() 55 if (acl == NULL) in set_acl_mask() 66 if (acl_calc_mask(&acl)) { in set_acl_mask() 68 acl_free(acl); in set_acl_mask() 80 while (acl_get_entry(acl, entry_id, &entry) == 1) { in set_acl_mask() 87 acl_free(acl); in set_acl_mask() 99 acl_free(acl); in set_acl_mask() 104 *prev_acl = acl_dup(acl); in set_acl_mask() 105 acl_free(acl); in set_acl_mask()
|
/freebsd/tests/sys/cddl/zfs/tests/acl/nontrivial/ |
H A D | nontrivial_test.sh | 36 . $(atf_get_srcdir)/../acl.cfg 45 . $(atf_get_srcdir)/../acl.cfg 61 . $(atf_get_srcdir)/../acl.cfg 70 . $(atf_get_srcdir)/../acl.cfg 86 . $(atf_get_srcdir)/../acl.cfg 95 . $(atf_get_srcdir)/../acl.cfg 110 . $(atf_get_srcdir)/../acl.cfg 119 . $(atf_get_srcdir)/../acl.cfg 134 . $(atf_get_srcdir)/../acl.cfg 143 . $(atf_get_srcdir)/../acl.cfg [all …]
|
H A D | zfs_acl_chmod_aclmode_001_pos.ksh | 27 . $STF_SUITE/tests/acl/acl_common.kshlib 209 typeset acl=$2 213 who=${acl%%:*} 215 acltemp=${acl#*:} 218 action=${acl##*:} 220 acl=$prefix:$(cal_bits $isdir 7 7 $acl 1):$action 222 $ECHO "$acl" 413 typeset acl 441 acl=$prefix:$preset 445 acl=$acl:deny [all …]
|
/freebsd/contrib/libarchive/libarchive/ |
H A D | archive_disk_acl_freebsd.c | 107 struct archive_entry *entry, acl_t acl, int default_entry_acl_type) in translate_acl() argument 127 if (acl_get_brand_np(acl, &brand) != 0) { in translate_acl() 158 s = acl_get_entry(acl, ACL_FIRST_ENTRY, &acl_entry); in translate_acl() 215 s = acl_get_entry(acl, ACL_NEXT_ENTRY, &acl_entry); in translate_acl() 310 s = acl_get_entry(acl, ACL_NEXT_ENTRY, &acl_entry); in translate_acl() 326 acl_t acl; in set_acl() local 374 acl = acl_init(entries); in set_acl() 375 if (acl == (acl_t)NULL) { in set_acl() 383 if (acl_create_entry(&acl, &acl_entry) != 0) { in set_acl() 535 if (acl_set_fd_np(fd, acl, acl_type) == 0) in set_acl() [all …]
|
H A D | 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, 58 static int archive_acl_text_want_type(struct archive_acl *acl, int flags); 59 static size_t archive_acl_text_len(struct archive_acl *acl, int want_type, 130 archive_acl_clear(struct archive_acl *acl) in archive_acl_clear() argument 134 while (acl->acl_head != NULL) { in archive_acl_clear() 135 ap = acl->acl_head->next; in archive_acl_clear() 136 archive_mstring_clean(&acl->acl_head->name); in archive_acl_clear() 137 free(acl->acl_head); in archive_acl_clear() [all …]
|
/freebsd/tests/sys/cddl/zfs/tests/acl/trivial/ |
H A D | trivial_test.sh | 35 . $(atf_get_srcdir)/../acl.cfg 44 . $(atf_get_srcdir)/../acl.cfg 59 . $(atf_get_srcdir)/../acl.cfg 68 . $(atf_get_srcdir)/../acl.cfg 83 . $(atf_get_srcdir)/../acl.cfg 92 . $(atf_get_srcdir)/../acl.cfg 107 . $(atf_get_srcdir)/../acl.cfg 116 . $(atf_get_srcdir)/../acl.cfg 132 . $(atf_get_srcdir)/../acl.cfg 141 . $(atf_get_srcdir)/../acl.cfg [all …]
|
/freebsd/contrib/bsnmp/snmp_vacm/ |
H A D | 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 …]
|
/freebsd/sys/contrib/openzfs/module/os/linux/zfs/ |
H A D | zpl_xattr.c | 965 zpl_set_acl_impl(struct inode *ip, struct posix_acl *acl, int type) in zpl_set_acl_impl() argument 977 if (acl) { in zpl_set_acl_impl() 979 error = posix_acl_equiv_mode(acl, &mode); in zpl_set_acl_impl() 998 acl = NULL; in zpl_set_acl_impl() 1006 return (acl ? -EACCES : 0); in zpl_set_acl_impl() 1013 if (acl) { in zpl_set_acl_impl() 1014 size = posix_acl_xattr_size(acl->a_count); in zpl_set_acl_impl() 1017 error = zpl_acl_to_xattr(acl, value, size); in zpl_set_acl_impl() 1029 if (acl) in zpl_set_acl_impl() 1030 set_cached_acl(ip, type, acl); in zpl_set_acl_impl() [all …]
|
/freebsd/sys/fs/ext2fs/ |
H A D | ext2_acl.c | 55 ext2_sync_acl_from_inode(struct inode *ip, struct acl *acl) in ext2_sync_acl_from_inode() argument 67 for (i = 0; i < acl->acl_cnt; i++) { in ext2_sync_acl_from_inode() 68 switch (acl->acl_entry[i].ae_tag) { in ext2_sync_acl_from_inode() 70 acl->acl_entry[i].ae_perm = acl_posix1e_mode_to_perm( in ext2_sync_acl_from_inode() 72 acl->acl_entry[i].ae_id = ACL_UNDEFINED_ID; in ext2_sync_acl_from_inode() 76 acl_group_obj = &acl->acl_entry[i]; in ext2_sync_acl_from_inode() 77 acl->acl_entry[i].ae_id = ACL_UNDEFINED_ID; in ext2_sync_acl_from_inode() 81 acl->acl_entry[i].ae_perm = acl_posix1e_mode_to_perm( in ext2_sync_acl_from_inode() 83 acl->acl_entry[i].ae_id = ACL_UNDEFINED_ID; in ext2_sync_acl_from_inode() 87 acl_mask = &acl->acl_entry[i]; in ext2_sync_acl_from_inode() [all …]
|
/freebsd/tests/sys/acl/ |
H A D | acl-api-test.c | 81 acl_t acl; in ATF_TC_BODY() local 85 acl = acl_from_mode_np(src_mode); in ATF_TC_BODY() 86 ATF_REQUIRE(acl != NULL); in ATF_TC_BODY() 88 ATF_CHECK_EQ(0, acl_equiv_mode_np(acl, &equiv_mode)); in ATF_TC_BODY() 91 acl_free(acl); in ATF_TC_BODY() 101 acl_t acl; in ATF_TC_BODY() local 106 acl = acl_init(1); in ATF_TC_BODY() 107 ATF_REQUIRE(acl != NULL); in ATF_TC_BODY() 110 ATF_CHECK_EQ(0, acl_equiv_mode_np(acl, &mode)); in ATF_TC_BODY() 115 ATF_REQUIRE_EQ(0, acl_create_entry(&acl, &entry)); in ATF_TC_BODY() [all …]
|
/freebsd/sys/sys/ |
H A D | acl.h | 119 struct acl { struct 131 struct acl ats_acl; 296 mode_t acl_posix1e_acl_to_mode(struct acl *acl); 298 struct acl *dacl); 299 struct acl *acl_alloc(int flags); 300 void acl_free(struct acl *aclp); 302 void acl_nfs4_sync_acl_from_mode(struct acl *aclp, 305 const struct acl *aclp); 306 int acl_nfs4_is_trivial(const struct acl *aclp, 309 const struct acl *parent_aclp, [all …]
|
/freebsd/contrib/libarchive/libarchive/test/ |
H A D | test_write_disk_mac_metadata.c | 29 #include <sys/acl.h> 46 clean_acl(const char *acl) { 48 if (strlen(acl) >= sizeof(_acl_temp)) in clean_acl() 49 return acl; in clean_acl() 51 strcpy(_acl_temp, acl); in clean_acl() 113 acl_t acl; in DEFINE_TEST() 157 assert(NULL != (acl = acl_get_file("file3", ACL_TYPE_EXTENDED))); in DEFINE_TEST() 158 assertEqualString(clean_acl(acl_to_text(acl, NULL)), in DEFINE_TEST() 159 "!#acl 1\n" in DEFINE_TEST() 163 if (acl) acl_fre in DEFINE_TEST() 47 clean_acl(const char * acl) clean_acl() argument [all...] |