Lines Matching refs:acl

35 posix_acl_init(struct posix_acl *acl, int count)  in posix_acl_init()  argument
37 atomic_set(&acl->a_refcount, 1); in posix_acl_init()
38 acl->a_count = count; in posix_acl_init()
49 struct posix_acl *acl = kmalloc(size, flags); in posix_acl_alloc() local
50 if (acl) in posix_acl_alloc()
51 posix_acl_init(acl, count); in posix_acl_alloc()
52 return acl; in posix_acl_alloc()
59 posix_acl_clone(const struct posix_acl *acl, gfp_t flags) in posix_acl_clone() argument
63 if (acl) { in posix_acl_clone()
64 int size = sizeof(struct posix_acl) + acl->a_count * in posix_acl_clone()
66 clone = kmemdup(acl, size, flags); in posix_acl_clone()
77 posix_acl_valid(const struct posix_acl *acl) in posix_acl_valid() argument
84 FOREACH_ACL_ENTRY(pa, acl, pe) { in posix_acl_valid()
152 posix_acl_equiv_mode(const struct posix_acl *acl, umode_t *mode_p) in posix_acl_equiv_mode() argument
161 if (!acl) in posix_acl_equiv_mode()
164 FOREACH_ACL_ENTRY(pa, acl, pe) { in posix_acl_equiv_mode()
199 struct posix_acl *acl = posix_acl_alloc(3, flags); in posix_acl_from_mode() local
200 if (!acl) in posix_acl_from_mode()
203 acl->a_entries[0].e_tag = ACL_USER_OBJ; in posix_acl_from_mode()
204 acl->a_entries[0].e_id = ACL_UNDEFINED_ID; in posix_acl_from_mode()
205 acl->a_entries[0].e_perm = (mode & S_IRWXU) >> 6; in posix_acl_from_mode()
207 acl->a_entries[1].e_tag = ACL_GROUP_OBJ; in posix_acl_from_mode()
208 acl->a_entries[1].e_id = ACL_UNDEFINED_ID; in posix_acl_from_mode()
209 acl->a_entries[1].e_perm = (mode & S_IRWXG) >> 3; in posix_acl_from_mode()
211 acl->a_entries[2].e_tag = ACL_OTHER; in posix_acl_from_mode()
212 acl->a_entries[2].e_id = ACL_UNDEFINED_ID; in posix_acl_from_mode()
213 acl->a_entries[2].e_perm = (mode & S_IRWXO); in posix_acl_from_mode()
214 return acl; in posix_acl_from_mode()
222 posix_acl_permission(struct inode *inode, const struct posix_acl *acl, int want) in posix_acl_permission() argument
229 FOREACH_ACL_ENTRY(pa, acl, pe) { in posix_acl_permission()
290 static int posix_acl_create_masq(struct posix_acl *acl, umode_t *mode_p) in posix_acl_create_masq() argument
299 FOREACH_ACL_ENTRY(pa, acl, pe) { in posix_acl_create_masq()
347 static int posix_acl_chmod_masq(struct posix_acl *acl, umode_t mode) in posix_acl_chmod_masq() argument
354 FOREACH_ACL_ENTRY(pa, acl, pe) { in posix_acl_chmod_masq()
393 posix_acl_create(struct posix_acl **acl, gfp_t gfp, umode_t *mode_p) in posix_acl_create() argument
395 struct posix_acl *clone = posix_acl_clone(*acl, gfp); in posix_acl_create()
404 posix_acl_release(*acl); in posix_acl_create()
405 *acl = clone; in posix_acl_create()
411 posix_acl_chmod(struct posix_acl **acl, gfp_t gfp, umode_t mode) in posix_acl_chmod() argument
413 struct posix_acl *clone = posix_acl_clone(*acl, gfp); in posix_acl_chmod()
422 posix_acl_release(*acl); in posix_acl_chmod()
423 *acl = clone; in posix_acl_chmod()