• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6/fs/ext2/

Lines Matching refs:acl

2  * linux/fs/ext2/acl.c
14 #include "acl.h"
24 struct posix_acl *acl;
39 acl = posix_acl_alloc(count, GFP_KERNEL);
40 if (!acl)
47 acl->a_entries[n].e_tag = le16_to_cpu(entry->e_tag);
48 acl->a_entries[n].e_perm = le16_to_cpu(entry->e_perm);
49 switch(acl->a_entries[n].e_tag) {
56 acl->a_entries[n].e_id = ACL_UNDEFINED_ID;
64 acl->a_entries[n].e_id =
74 return acl;
77 posix_acl_release(acl);
85 ext2_acl_to_disk(const struct posix_acl *acl, size_t *size)
91 *size = ext2_acl_size(acl->a_count);
92 ext_acl = kmalloc(sizeof(ext2_acl_header) + acl->a_count *
98 for (n=0; n < acl->a_count; n++) {
100 entry->e_tag = cpu_to_le16(acl->a_entries[n].e_tag);
101 entry->e_perm = cpu_to_le16(acl->a_entries[n].e_perm);
102 switch(acl->a_entries[n].e_tag) {
106 cpu_to_le32(acl->a_entries[n].e_id);
136 struct posix_acl *acl;
142 acl = get_cached_acl(inode, type);
143 if (acl != ACL_NOT_CACHED)
144 return acl;
164 acl = ext2_acl_from_disk(value, retval);
166 acl = NULL;
168 acl = ERR_PTR(retval);
171 if (!IS_ERR(acl))
172 set_cached_acl(inode, type, acl);
174 return acl;
181 ext2_set_acl(struct inode *inode, int type, struct posix_acl *acl)
196 if (acl) {
198 error = posix_acl_equiv_mode(acl, &mode);
206 acl = NULL;
214 return acl ? -EACCES : 0;
220 if (acl) {
221 value = ext2_acl_to_disk(acl, &size);
230 set_cached_acl(inode, type, acl);
237 struct posix_acl *acl = ext2_get_acl(inode, ACL_TYPE_ACCESS);
239 if (IS_ERR(acl))
240 return PTR_ERR(acl);
241 if (acl) {
242 int error = posix_acl_permission(inode, acl, mask);
243 posix_acl_release(acl);
259 struct posix_acl *acl = NULL;
264 acl = ext2_get_acl(dir, ACL_TYPE_DEFAULT);
265 if (IS_ERR(acl))
266 return PTR_ERR(acl);
268 if (!acl)
271 if (test_opt(inode->i_sb, POSIX_ACL) && acl) {
276 error = ext2_set_acl(inode, ACL_TYPE_DEFAULT, acl);
280 clone = posix_acl_clone(acl, GFP_KERNEL);
297 posix_acl_release(acl);
318 struct posix_acl *acl, *clone;
325 acl = ext2_get_acl(inode, ACL_TYPE_ACCESS);
326 if (IS_ERR(acl) || !acl)
327 return PTR_ERR(acl);
328 clone = posix_acl_clone(acl, GFP_KERNEL);
329 posix_acl_release(acl);
372 struct posix_acl *acl;
380 acl = ext2_get_acl(dentry->d_inode, type);
381 if (IS_ERR(acl))
382 return PTR_ERR(acl);
383 if (acl == NULL)
385 error = posix_acl_to_xattr(acl, buffer, size);
386 posix_acl_release(acl);
395 struct posix_acl *acl;
406 acl = posix_acl_from_xattr(value, size);
407 if (IS_ERR(acl))
408 return PTR_ERR(acl);
409 else if (acl) {
410 error = posix_acl_valid(acl);
415 acl = NULL;
417 error = ext2_set_acl(dentry->d_inode, type, acl);
420 posix_acl_release(acl);