Home
last modified time | relevance | path

Searched refs:aclp (Results 1 – 25 of 40) sorted by relevance

12

/freebsd/lib/libc/posix1e/
H A Dacl_get.c59 acl_t aclp; in acl_get_file() local
62 aclp = acl_init(ACL_MAX_ENTRIES); in acl_get_file()
63 if (aclp == NULL) in acl_get_file()
67 error = __acl_get_file(path_p, type, &aclp->ats_acl); in acl_get_file()
69 acl_free(aclp); in acl_get_file()
73 aclp->ats_acl.acl_maxcnt = ACL_MAX_ENTRIES; in acl_get_file()
74 _acl_brand_from_type(aclp, type); in acl_get_file()
76 return (aclp); in acl_get_file()
82 acl_t aclp; in acl_get_link_np() local
85 aclp = acl_init(ACL_MAX_ENTRIES); in acl_get_link_np()
[all …]
H A Dacl_strip.c41 void acl_nfs4_sync_mode_from_acl(mode_t *_mode, const struct acl *aclp);
42 void acl_nfs4_trivial_from_mode_libc(struct acl *aclp, int file_owner_id,
46 _nfs4_acl_strip_np(const acl_t aclp, int canonical_six) in _nfs4_acl_strip_np() argument
59 acl_nfs4_sync_mode_from_acl(&mode, &(aclp->ats_acl)); in _nfs4_acl_strip_np()
66 _posix1e_acl_strip_np(const acl_t aclp, int recalculate_mask) in _posix1e_acl_strip_np() argument
73 assert(_acl_brand(aclp) == ACL_BRAND_POSIX); in _posix1e_acl_strip_np()
75 acl_old = acl_dup(aclp); in _posix1e_acl_strip_np()
134 acl_strip_np(const acl_t aclp, int recalculate_mask) in acl_strip_np() argument
136 switch (_acl_brand(aclp)) { in acl_strip_np()
138 return (_nfs4_acl_strip_np(aclp, 0)); in acl_strip_np()
[all …]
H A Dacl_branding.c50 acl_t aclp; in entry2acl() local
52 aclp = (acl_t)(((long)entry >> _ACL_T_ALIGNMENT_BITS) << _ACL_T_ALIGNMENT_BITS); in entry2acl()
54 return (aclp); in entry2acl()
H A Dacl_from_text.c49 int _nfs4_acl_entry_from_text(acl_t aclp, char *entry);
82 _posix1e_acl_entry_from_text(acl_t aclp, char *entry) in _posix1e_acl_entry_from_text() argument
90 assert(_acl_brand(aclp) == ACL_BRAND_POSIX); in _posix1e_acl_entry_from_text()
160 error = _posix1e_acl_add_entry(aclp, t, id, p); in _posix1e_acl_entry_from_text()
H A Dacl_to_text_nfs4.c229 _nfs4_acl_to_text_np(const acl_t aclp, ssize_t *len_p, int flags) in _nfs4_acl_to_text_np() argument
235 if (aclp->ats_acl.acl_cnt == 0) in _nfs4_acl_to_text_np()
238 size = aclp->ats_acl.acl_cnt * MAX_ENTRY_LENGTH; in _nfs4_acl_to_text_np()
243 while (acl_get_entry(aclp, entry_id, &entry) == 1) { in _nfs4_acl_to_text_np()
H A Dacl_from_text_nfs4.c200 _nfs4_acl_entry_from_text(acl_t aclp, char *str) in _nfs4_acl_entry_from_text() argument
206 error = acl_create_entry(&aclp, &entry); in _nfs4_acl_entry_from_text()
278 acl_delete_entry(aclp, entry); in _nfs4_acl_entry_from_text()
/freebsd/sys/contrib/openzfs/module/os/freebsd/zfs/
H A Dzfs_acl.c448 zfs_acl_t *aclp; in zfs_acl_alloc() local
450 aclp = kmem_zalloc(sizeof (zfs_acl_t), KM_SLEEP); in zfs_acl_alloc()
451 list_create(&aclp->z_acl, sizeof (zfs_acl_node_t), in zfs_acl_alloc()
453 aclp->z_version = vers; in zfs_acl_alloc()
455 aclp->z_ops = &zfs_acl_fuid_ops; in zfs_acl_alloc()
457 aclp->z_ops = &zfs_acl_v0_ops; in zfs_acl_alloc()
458 return (aclp); in zfs_acl_alloc()
486 zfs_acl_release_nodes(zfs_acl_t *aclp) in zfs_acl_release_nodes() argument
490 while ((aclnode = list_remove_head(&aclp->z_acl))) in zfs_acl_release_nodes()
492 aclp->z_acl_count = 0; in zfs_acl_release_nodes()
[all …]
/freebsd/sys/contrib/openzfs/module/os/linux/zfs/
H A Dzfs_acl.c446 zfs_acl_t *aclp; in zfs_acl_alloc() local
448 aclp = kmem_zalloc(sizeof (zfs_acl_t), KM_SLEEP); in zfs_acl_alloc()
449 list_create(&aclp->z_acl, sizeof (zfs_acl_node_t), in zfs_acl_alloc()
451 aclp->z_version = vers; in zfs_acl_alloc()
453 aclp->z_ops = &zfs_acl_fuid_ops; in zfs_acl_alloc()
455 aclp->z_ops = &zfs_acl_v0_ops; in zfs_acl_alloc()
456 return (aclp); in zfs_acl_alloc()
484 zfs_acl_release_nodes(zfs_acl_t *aclp) in zfs_acl_release_nodes() argument
488 while ((aclnode = list_remove_head(&aclp->z_acl))) in zfs_acl_release_nodes()
490 aclp->z_acl_count = 0; in zfs_acl_release_nodes()
[all …]
/freebsd/sys/kern/
H A Dsubr_acl_nfs4.c59 static void acl_nfs4_trivial_from_mode(struct acl *aclp, mode_t mode);
109 _acl_denies(const struct acl *aclp, int access_mask, struct ucred *cred, in _acl_denies() argument
118 KASSERT(aclp->acl_cnt <= ACL_MAX_ENTRIES, in _acl_denies()
121 for (i = 0; i < aclp->acl_cnt; i++) { in _acl_denies()
122 entry = &(aclp->acl_entry[i]); in _acl_denies()
172 struct acl *aclp, accmode_t accmode, struct ucred *cred) in vaccess_acl_nfs4() argument
221 denied = _acl_denies(aclp, access_mask, cred, file_uid, file_gid, in vaccess_acl_nfs4()
235 acl_nfs4_sync_mode_from_acl(&file_mode, aclp); in vaccess_acl_nfs4()
321 _acl_append(struct acl *aclp, acl_tag_t tag, acl_perm_t perm, in _acl_append() argument
326 KASSERT(aclp->acl_cnt + 1 <= ACL_MAX_ENTRIES, in _acl_append()
[all …]
H A Dvfs_acl.c67 acl_type_t type, struct acl *aclp, int follow);
71 acl_type_t type, struct acl *aclp, int follow);
73 acl_type_t type, const struct acl *aclp, int follow);
75 acl_type_t type, const struct acl *aclp);
77 acl_type_t type, struct acl *aclp);
79 acl_type_t type, const struct acl *aclp);
225 const struct acl *aclp) in vacl_set_acl() argument
233 error = acl_copyin(aclp, inkernelacl, type); in vacl_set_acl()
263 struct acl *aclp) in vacl_get_acl() argument
285 error = acl_copyout(inkernelacl, aclp, type); in vacl_get_acl()
[all …]
/freebsd/sys/cddl/compat/opensolaris/kern/
H A Dopensolaris_acl.c100 acl_from_aces(struct acl *aclp, const ace_t *aces, int nentries) in acl_from_aces() argument
121 bzero(aclp, sizeof(*aclp)); in acl_from_aces()
122 aclp->acl_maxcnt = ACL_MAX_ENTRIES; in acl_from_aces()
123 aclp->acl_cnt = nentries; in acl_from_aces()
126 entry = &(aclp->acl_entry[i]); in acl_from_aces()
170 aces_from_acl(ace_t *aces, int *nentries, const struct acl *aclp) in aces_from_acl() argument
176 bzero(aces, sizeof(*aces) * aclp->acl_cnt); in aces_from_acl()
178 *nentries = aclp->acl_cnt; in aces_from_acl()
180 for (i = 0; i < aclp->acl_cnt; i++) { in aces_from_acl()
181 entry = &(aclp->acl_entry[i]); in aces_from_acl()
/freebsd/sys/contrib/openzfs/module/os/freebsd/spl/
H A Dspl_acl.c102 acl_from_aces(struct acl *aclp, const ace_t *aces, int nentries) in acl_from_aces() argument
123 memset(aclp, 0, sizeof (*aclp)); in acl_from_aces()
124 aclp->acl_maxcnt = ACL_MAX_ENTRIES; in acl_from_aces()
125 aclp->acl_cnt = nentries; in acl_from_aces()
128 entry = &(aclp->acl_entry[i]); in acl_from_aces()
172 aces_from_acl(ace_t *aces, int *nentries, const struct acl *aclp) in aces_from_acl() argument
178 memset(aces, 0, sizeof (*aces) * aclp->acl_cnt); in aces_from_acl()
180 *nentries = aclp->acl_cnt; in aces_from_acl()
182 for (i = 0; i < aclp->acl_cnt; i++) { in aces_from_acl()
183 entry = &(aclp->acl_entry[i]); in aces_from_acl()
H A Dacl_common.c225 acl_t *aclp; in acl_alloc() local
227 if (cacl_malloc((void **)&aclp, sizeof (acl_t)) != 0) in acl_alloc()
230 aclp->acl_aclp = NULL; in acl_alloc()
231 aclp->acl_cnt = 0; in acl_alloc()
235 aclp->acl_type = ACE_T; in acl_alloc()
236 aclp->acl_entry_size = sizeof (ace_t); in acl_alloc()
239 aclp->acl_type = ACLENT_T; in acl_alloc()
240 aclp->acl_entry_size = sizeof (aclent_t); in acl_alloc()
243 acl_free(aclp); in acl_alloc()
244 aclp = NULL; in acl_alloc()
[all …]
/freebsd/sys/ufs/ufs/
H A Dufs_acl.c155 ufs_getacl_nfs4_internal(struct vnode *vp, struct acl *aclp, struct thread *td) in ufs_getacl_nfs4_internal() argument
160 len = sizeof(*aclp); in ufs_getacl_nfs4_internal()
161 bzero(aclp, len); in ufs_getacl_nfs4_internal()
165 &len, (char *) aclp, td); in ufs_getacl_nfs4_internal()
166 aclp->acl_maxcnt = ACL_MAX_ENTRIES; in ufs_getacl_nfs4_internal()
172 acl_nfs4_sync_acl_from_mode(aclp, ip->i_mode, ip->i_uid); in ufs_getacl_nfs4_internal()
180 if (len != sizeof(*aclp)) { in ufs_getacl_nfs4_internal()
194 error = acl_nfs4_check(aclp, vp->v_type == VDIR); in ufs_getacl_nfs4_internal()
374 ufs_setacl_nfs4_internal(struct vnode *vp, struct acl *aclp, struct thread *td) in ufs_setacl_nfs4_internal() argument
380 KASSERT(acl_nfs4_check(aclp, vp->v_type == VDIR) == 0, in ufs_setacl_nfs4_internal()
[all …]
H A Dacl.h42 int ufs_getacl_nfs4_internal(struct vnode *vp, struct acl *aclp,
44 int ufs_setacl_nfs4_internal(struct vnode *vp, struct acl *aclp,
/freebsd/contrib/libarchive/libarchive/test/
H A Dtest_acl_platform_posix1e.c221 void *aclp, int aclcnt, argument
251 acl_entry = &((aclent_t *)aclp)[e];
300 void *aclp;
336 aclp = sunacl_get(GETACL, &aclcnt, 0, "test0");
338 assert(aclp != NULL);
345 compare_acls(aclp, aclcnt, acls2, sizeof(acls2)/sizeof(acls2[0]));
346 free(aclp);
347 aclp = NULL;
370 void *aclp;
419 aclp = sunacl_get(GETACL, &aclcnt, fd, NULL);
[all …]
H A Dtest_acl_platform_nfs4.c684 void *aclp, in compare_acls() argument
714 if (aclp == NULL) in compare_acls()
748 acl_entry = &((ace_t *)aclp)[e]; in compare_acls()
869 void *aclp; in DEFINE_TEST()
930 aclp = sunacl_get(ACE_GETACL, &aclcnt, 0, "testall"); in DEFINE_TEST()
933 assert(aclp != NULL); in DEFINE_TEST()
950 compare_acls(aclp, aclcnt, acls_reg, "testall", 0, regcnt); in DEFINE_TEST()
951 free(aclp); in DEFINE_TEST()
952 aclp = NULL; in DEFINE_TEST()
968 aclp = sunacl_get(ACE_GETACL, &aclcnt, 0, buff); in DEFINE_TEST()
[all …]
/freebsd/sys/fs/nfs/
H A Dnfs_commonacl.c539 nfsrv_buildacl(struct nfsrv_descript *nd, NFSACL_T *aclp, __enum_uint8(vtype) type, in nfsrv_buildacl() argument
552 for (i = 0; i < aclp->acl_cnt; i++) { in nfsrv_buildacl()
554 switch (aclp->acl_entry[i].ae_tag) { in nfsrv_buildacl()
571 nfsv4_uidtostr(aclp->acl_entry[i].ae_id, &name, in nfsrv_buildacl()
579 nfsv4_gidtostr((gid_t)aclp->acl_entry[i].ae_id, &name, in nfsrv_buildacl()
588 isowner, &aclp->acl_entry[i]); in nfsrv_buildacl()
601 nfsrv_buildposixacl(struct nfsrv_descript *nd, NFSACL_T *aclp, in nfsrv_buildposixacl() argument
614 if (aclp != NULL) in nfsrv_buildposixacl()
615 cnt = aclp->acl_cnt; in nfsrv_buildposixacl()
621 switch (aclp->acl_entry[i].ae_tag) { in nfsrv_buildposixacl()
[all …]
H A Dnfs_commonsubs.c1168 nfsrv_dissectacl(struct nfsrv_descript *nd, NFSACL_T *aclp, bool server, in nfsrv_dissectacl() argument
1176 if (aclp != NULL) in nfsrv_dissectacl()
1177 aclp->acl_cnt = 0; in nfsrv_dissectacl()
1198 if (aclp != NULL && aceerr == 0) { in nfsrv_dissectacl()
1201 &aclp->acl_entry[i], server, &aceerr, in nfsrv_dissectacl()
1205 &aclp->acl_entry[i], server, &aceerr, in nfsrv_dissectacl()
1215 if (aclp != NULL && aceerr == 0) in nfsrv_dissectacl()
1216 aclp->acl_cnt = acecnt; in nfsrv_dissectacl()
1346 struct nfsfsinfo *fsp, NFSACL_T *aclp, int compare, int *retcmpp, in nfsv4_loadattr() argument
1675 if (aceerr || aclp == NULL || in nfsv4_loadattr()
[all …]
/freebsd/sys/contrib/openzfs/include/os/freebsd/spl/acl/
H A Dacl_common.h45 extern void acl_free(acl_t *aclp);
46 extern int acl_translate(acl_t *aclp, int target_flavor, boolean_t isdir,
/freebsd/sys/sys/
H A Dacl.h300 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,
325 int acl_nfs4_check(const struct acl *aclp, int is_directory);
/freebsd/contrib/llvm-project/compiler-rt/include/sanitizer/
H A Dnetbsd_syscall_hooks.h2761 #define __sanitizer_syscall_pre___acl_get_link(path, type, aclp) \ argument
2763 (long long)(path), (long long)(type), (long long)(aclp))
2764 #define __sanitizer_syscall_post___acl_get_link(res, path, type, aclp) \ argument
2766 res, (long long)(path), (long long)(type), (long long)(aclp))
2767 #define __sanitizer_syscall_pre___acl_set_link(path, type, aclp) \ argument
2769 (long long)(path), (long long)(type), (long long)(aclp))
2770 #define __sanitizer_syscall_post___acl_set_link(res, path, type, aclp) \ argument
2772 res, (long long)(path), (long long)(type), (long long)(aclp))
2779 #define __sanitizer_syscall_pre___acl_aclcheck_link(path, type, aclp) \ argument
2781 (long long)(path), (long long)(type), (long long)(aclp))
[all …]
/freebsd/sys/contrib/openzfs/include/os/freebsd/spl/sys/
H A Dacl.h195 extern void aces_from_acl(ace_t *aces, int *nentries, const struct acl *aclp);
196 extern int acl_from_aces(struct acl *aclp, const ace_t *aces, int nentries);
/freebsd/sys/fs/nfsserver/
H A Dnfs_nfsdserv.c121 NFSACL_T *aclp, NFSPROC_T *p, struct nfsexstuff *exp, char *pathcp,
126 int *diraft_retp, nfsattrbit_t *attrbitp, NFSACL_T *aclp, NFSACL_T *daclp,
413 NFSACL_T *aclp = NULL, *daclp = NULL; in nfsrvd_setattr() local
422 aclp = acl_alloc(M_WAITOK); in nfsrvd_setattr()
423 aclp->acl_cnt = 0; in nfsrvd_setattr()
441 error = nfsrv_sattr(nd, vp, &nva, &attrbits, aclp, daclp, p); in nfsrvd_setattr()
469 acl_free(aclp); in nfsrvd_setattr()
647 if (!nd->nd_repstat && aclp->acl_cnt > 0 && in nfsrvd_setattr()
649 nd->nd_repstat = nfsrv_setacl(vp, aclp, ACL_TYPE_NFS4, in nfsrvd_setattr()
654 if (!nd->nd_repstat && aclp->acl_cnt > 0 && in nfsrvd_setattr()
[all …]
/freebsd/lib/libsys/
H A D_libsys.h674 int __sys___acl_get_file(const char * path, __acl_type_t type, struct acl * aclp);
675 int __sys___acl_set_file(const char * path, __acl_type_t type, struct acl * aclp);
676 int __sys___acl_get_fd(int filedes, __acl_type_t type, struct acl * aclp);
677 int __sys___acl_set_fd(int filedes, __acl_type_t type, struct acl * aclp);
680 int __sys___acl_aclcheck_file(const char * path, __acl_type_t type, struct acl * aclp);
681 int __sys___acl_aclcheck_fd(int filedes, __acl_type_t type, struct acl * aclp);
729 int __sys___acl_get_link(const char * path, __acl_type_t type, struct acl * aclp);
730 int __sys___acl_set_link(const char * path, __acl_type_t type, struct acl * aclp);
732 int __sys___acl_aclcheck_link(const char * path, __acl_type_t type, struct acl * aclp);

12