/fs/ext2/ |
D | acl.c | 24 struct posix_acl *acl; in ext2_acl_from_disk() local 39 acl = posix_acl_alloc(count, GFP_KERNEL); in ext2_acl_from_disk() 40 if (!acl) in ext2_acl_from_disk() 47 acl->a_entries[n].e_tag = le16_to_cpu(entry->e_tag); in ext2_acl_from_disk() 48 acl->a_entries[n].e_perm = le16_to_cpu(entry->e_perm); in ext2_acl_from_disk() 49 switch(acl->a_entries[n].e_tag) { in ext2_acl_from_disk() 56 acl->a_entries[n].e_id = ACL_UNDEFINED_ID; in ext2_acl_from_disk() 64 acl->a_entries[n].e_id = in ext2_acl_from_disk() 74 return acl; in ext2_acl_from_disk() 77 posix_acl_release(acl); in ext2_acl_from_disk() [all …]
|
D | Kconfig | 17 <http://acl.bestbits.at/> for details). 30 Linux website <http://acl.bestbits.at/>.
|
/fs/jffs2/ |
D | acl.c | 58 struct posix_acl *acl; in jffs2_acl_from_medium() local 79 acl = posix_acl_alloc(count, GFP_KERNEL); in jffs2_acl_from_medium() 80 if (!acl) in jffs2_acl_from_medium() 87 acl->a_entries[i].e_tag = je16_to_cpu(entry->e_tag); in jffs2_acl_from_medium() 88 acl->a_entries[i].e_perm = je16_to_cpu(entry->e_perm); in jffs2_acl_from_medium() 89 switch (acl->a_entries[i].e_tag) { in jffs2_acl_from_medium() 95 acl->a_entries[i].e_id = ACL_UNDEFINED_ID; in jffs2_acl_from_medium() 103 acl->a_entries[i].e_id = je32_to_cpu(entry->e_id); in jffs2_acl_from_medium() 112 return acl; in jffs2_acl_from_medium() 114 posix_acl_release(acl); in jffs2_acl_from_medium() [all …]
|
/fs/ext4/ |
D | acl.c | 25 struct posix_acl *acl; in ext4_acl_from_disk() local 40 acl = posix_acl_alloc(count, GFP_NOFS); in ext4_acl_from_disk() 41 if (!acl) in ext4_acl_from_disk() 48 acl->a_entries[n].e_tag = le16_to_cpu(entry->e_tag); in ext4_acl_from_disk() 49 acl->a_entries[n].e_perm = le16_to_cpu(entry->e_perm); in ext4_acl_from_disk() 51 switch (acl->a_entries[n].e_tag) { in ext4_acl_from_disk() 58 acl->a_entries[n].e_id = ACL_UNDEFINED_ID; in ext4_acl_from_disk() 66 acl->a_entries[n].e_id = in ext4_acl_from_disk() 76 return acl; in ext4_acl_from_disk() 79 posix_acl_release(acl); in ext4_acl_from_disk() [all …]
|
/fs/ext3/ |
D | acl.c | 25 struct posix_acl *acl; in ext3_acl_from_disk() local 40 acl = posix_acl_alloc(count, GFP_NOFS); in ext3_acl_from_disk() 41 if (!acl) in ext3_acl_from_disk() 48 acl->a_entries[n].e_tag = le16_to_cpu(entry->e_tag); in ext3_acl_from_disk() 49 acl->a_entries[n].e_perm = le16_to_cpu(entry->e_perm); in ext3_acl_from_disk() 50 switch(acl->a_entries[n].e_tag) { in ext3_acl_from_disk() 57 acl->a_entries[n].e_id = ACL_UNDEFINED_ID; in ext3_acl_from_disk() 65 acl->a_entries[n].e_id = in ext3_acl_from_disk() 75 return acl; in ext3_acl_from_disk() 78 posix_acl_release(acl); in ext3_acl_from_disk() [all …]
|
/fs/reiserfs/ |
D | xattr_acl.c | 14 struct posix_acl *acl); 19 struct posix_acl *acl; in xattr_set_acl() local 28 acl = posix_acl_from_xattr(value, size); in xattr_set_acl() 29 if (IS_ERR(acl)) { in xattr_set_acl() 30 return PTR_ERR(acl); in xattr_set_acl() 31 } else if (acl) { in xattr_set_acl() 32 error = posix_acl_valid(acl); in xattr_set_acl() 37 acl = NULL; in xattr_set_acl() 39 error = reiserfs_set_acl(inode, type, acl); in xattr_set_acl() 42 posix_acl_release(acl); in xattr_set_acl() [all …]
|
D | xattr.c | 1231 struct posix_acl *acl; in reiserfs_check_acl() local 1237 acl = reiserfs_get_acl(inode, ACL_TYPE_ACCESS); in reiserfs_check_acl() 1242 if (acl) { in reiserfs_check_acl() 1243 if (!IS_ERR(acl)) { in reiserfs_check_acl() 1244 error = posix_acl_permission(inode, acl, mask); in reiserfs_check_acl() 1245 posix_acl_release(acl); in reiserfs_check_acl() 1246 } else if (PTR_ERR(acl) != -ENODATA) in reiserfs_check_acl() 1247 error = PTR_ERR(acl); in reiserfs_check_acl()
|
/fs/btrfs/ |
D | acl.c | 34 struct posix_acl *acl) in btrfs_update_cached_acl() argument 39 *p_acl = posix_acl_dup(acl); in btrfs_update_cached_acl() 48 struct posix_acl *acl = NULL, **p_acl; in btrfs_get_acl() local 65 acl = posix_acl_dup(*p_acl); in btrfs_get_acl() 68 if (acl) in btrfs_get_acl() 69 return acl; in btrfs_get_acl() 79 acl = posix_acl_from_xattr(value, size); in btrfs_get_acl() 80 btrfs_update_cached_acl(inode, p_acl, acl); in btrfs_get_acl() 84 acl = NULL; in btrfs_get_acl() 85 btrfs_update_cached_acl(inode, p_acl, acl); in btrfs_get_acl() [all …]
|
/fs/ocfs2/ |
D | acl.c | 44 struct posix_acl *acl; in ocfs2_acl_from_xattr() local 57 acl = posix_acl_alloc(count, GFP_NOFS); in ocfs2_acl_from_xattr() 58 if (!acl) in ocfs2_acl_from_xattr() 64 acl->a_entries[n].e_tag = le16_to_cpu(entry->e_tag); in ocfs2_acl_from_xattr() 65 acl->a_entries[n].e_perm = le16_to_cpu(entry->e_perm); in ocfs2_acl_from_xattr() 66 acl->a_entries[n].e_id = le32_to_cpu(entry->e_id); in ocfs2_acl_from_xattr() 70 return acl; in ocfs2_acl_from_xattr() 76 static void *ocfs2_acl_to_xattr(const struct posix_acl *acl, size_t *size) in ocfs2_acl_to_xattr() argument 82 *size = acl->a_count * sizeof(struct posix_acl_entry); in ocfs2_acl_to_xattr() 89 for (n = 0; n < acl->a_count; n++, entry++) { in ocfs2_acl_to_xattr() [all …]
|
/fs/nfs/ |
D | nfs3acl.c | 15 struct posix_acl *acl; in nfs3_listxattr() local 26 acl = nfs3_proc_getacl(inode, ACL_TYPE_ACCESS); in nfs3_listxattr() 27 if (IS_ERR(acl)) in nfs3_listxattr() 28 return PTR_ERR(acl); in nfs3_listxattr() 29 if (acl) { in nfs3_listxattr() 31 posix_acl_release(acl); in nfs3_listxattr() 35 acl = nfs3_proc_getacl(inode, ACL_TYPE_DEFAULT); in nfs3_listxattr() 36 if (IS_ERR(acl)) in nfs3_listxattr() 37 return PTR_ERR(acl); in nfs3_listxattr() 38 if (acl) { in nfs3_listxattr() [all …]
|
/fs/ |
D | generic_acl.c | 21 struct posix_acl *acl; in generic_acl_list() local 25 acl = ops->getacl(inode, type); in generic_acl_list() 26 if (!acl) in generic_acl_list() 28 posix_acl_release(acl); in generic_acl_list() 56 struct posix_acl *acl; in generic_acl_get() local 59 acl = ops->getacl(inode, type); in generic_acl_get() 60 if (!acl) in generic_acl_get() 62 error = posix_acl_to_xattr(acl, buffer, size); in generic_acl_get() 63 posix_acl_release(acl); in generic_acl_get() 76 struct posix_acl *acl = NULL; in generic_acl_set() local [all …]
|
D | posix_acl.c | 42 struct posix_acl *acl = kmalloc(size, flags); in posix_acl_alloc() local 43 if (acl) { in posix_acl_alloc() 44 atomic_set(&acl->a_refcount, 1); in posix_acl_alloc() 45 acl->a_count = count; in posix_acl_alloc() 47 return acl; in posix_acl_alloc() 54 posix_acl_clone(const struct posix_acl *acl, gfp_t flags) in posix_acl_clone() argument 58 if (acl) { in posix_acl_clone() 59 int size = sizeof(struct posix_acl) + acl->a_count * in posix_acl_clone() 61 clone = kmemdup(acl, size, flags); in posix_acl_clone() 72 posix_acl_valid(const struct posix_acl *acl) in posix_acl_valid() argument [all …]
|
D | xattr_acl.c | 23 struct posix_acl *acl; in posix_acl_from_xattr() local 39 acl = posix_acl_alloc(count, GFP_KERNEL); in posix_acl_from_xattr() 40 if (!acl) in posix_acl_from_xattr() 42 acl_e = acl->a_entries; in posix_acl_from_xattr() 65 return acl; in posix_acl_from_xattr() 68 posix_acl_release(acl); in posix_acl_from_xattr() 77 posix_acl_to_xattr(const struct posix_acl *acl, void *buffer, size_t size) in posix_acl_to_xattr() argument 83 real_size = posix_acl_xattr_size(acl->a_count); in posix_acl_to_xattr() 91 for (n=0; n < acl->a_count; n++, ext_entry++) { in posix_acl_to_xattr() 92 ext_entry->e_tag = cpu_to_le16(acl->a_entries[n].e_tag); in posix_acl_to_xattr() [all …]
|
/fs/gfs2/ |
D | acl.c | 38 struct posix_acl *acl; in gfs2_acl_validate_set() local 48 acl = posix_acl_from_xattr(er->er_data, er->er_data_len); in gfs2_acl_validate_set() 49 if (IS_ERR(acl)) in gfs2_acl_validate_set() 50 return PTR_ERR(acl); in gfs2_acl_validate_set() 51 if (!acl) { in gfs2_acl_validate_set() 56 error = posix_acl_valid(acl); in gfs2_acl_validate_set() 61 error = posix_acl_equiv_mode(acl, mode); in gfs2_acl_validate_set() 69 posix_acl_release(acl); in gfs2_acl_validate_set() 87 static int acl_get(struct gfs2_inode *ip, int access, struct posix_acl **acl, in acl_get() argument 128 if (acl) { in acl_get() [all …]
|
/fs/jfs/ |
D | acl.c | 32 struct posix_acl *acl; in jfs_get_acl() local 67 acl = NULL; in jfs_get_acl() 69 acl = ERR_PTR(size); in jfs_get_acl() 71 acl = posix_acl_from_xattr(value, size); in jfs_get_acl() 72 if (!IS_ERR(acl)) in jfs_get_acl() 73 *p_acl = posix_acl_dup(acl); in jfs_get_acl() 76 return acl; in jfs_get_acl() 80 struct posix_acl *acl) in jfs_set_acl() argument 101 return acl ? -EACCES : 0; in jfs_set_acl() 106 if (acl) { in jfs_set_acl() [all …]
|
D | xattr.c | 697 struct posix_acl *acl; in can_set_system_xattr() local 707 acl = posix_acl_from_xattr(value, value_len); in can_set_system_xattr() 708 if (IS_ERR(acl)) { in can_set_system_xattr() 709 rc = PTR_ERR(acl); in can_set_system_xattr() 714 if (acl) { in can_set_system_xattr() 716 rc = posix_acl_equiv_mode(acl, &mode); in can_set_system_xattr() 717 posix_acl_release(acl); in can_set_system_xattr() 730 acl =JFS_IP(inode)->i_acl; in can_set_system_xattr() 731 if (acl != JFS_ACL_NOT_CACHED) in can_set_system_xattr() 732 posix_acl_release(acl); in can_set_system_xattr() [all …]
|
D | namei.c | 415 if (JFS_IP(ip)->acl.flag & DXD_EXTENT) { in jfs_rmdir() 417 txEA(tid, ip, &JFS_IP(ip)->acl, NULL); in jfs_rmdir() 419 JFS_IP(ip)->acl.flag = 0; in jfs_rmdir() 664 if (JFS_IP(ip)->acl.flag & DXD_EXTENT) in commitZeroLink() 666 txEA(tid, ip, &JFS_IP(ip)->acl, NULL); in commitZeroLink() 738 if (JFS_IP(ip)->acl.flag & DXD_EXTENT) { in jfs_free_zero_link() 739 s64 xaddr = addressDXD(&JFS_IP(ip)->acl); in jfs_free_zero_link() 740 int xlen = lengthDXD(&JFS_IP(ip)->acl); in jfs_free_zero_link() 744 invalidate_dxd_metapages(ip, JFS_IP(ip)->acl); in jfs_free_zero_link()
|
/fs/nfs_common/ |
D | nfsacl.c | 38 struct posix_acl *acl; member 52 &nfsacl_desc->acl->a_entries[nfsacl_desc->count++]; in xdr_nfsace_encode() 76 struct posix_acl *acl, int encode_entries, int typeflag) in nfsacl_encode() argument 78 int entries = (acl && acl->a_count) ? max_t(int, acl->a_count, 4) : 0; in nfsacl_encode() 85 .acl = acl, in nfsacl_encode() 96 if (encode_entries && acl && acl->a_count == 3) { in nfsacl_encode() 103 acl2->a_entries[0] = acl->a_entries[0]; /* ACL_USER_OBJ */ in nfsacl_encode() 104 acl2->a_entries[1] = acl->a_entries[1]; /* ACL_GROUP_OBJ */ in nfsacl_encode() 105 acl2->a_entries[2] = acl->a_entries[1]; /* ACL_MASK */ in nfsacl_encode() 107 acl2->a_entries[3] = acl->a_entries[2]; /* ACL_OTHER */ in nfsacl_encode() [all …]
|
/fs/nfsd/ |
D | nfs4acl.c | 145 struct nfs4_acl *acl; in nfs4_acl_posix_to_nfsv4() local 160 acl = nfs4_acl_new(size); in nfs4_acl_posix_to_nfsv4() 161 if (acl == NULL) in nfs4_acl_posix_to_nfsv4() 165 _posix_to_nfsv4_one(pacl, acl, flags & ~NFS4_ACL_TYPE_DEFAULT); in nfs4_acl_posix_to_nfsv4() 168 _posix_to_nfsv4_one(dpacl, acl, flags | NFS4_ACL_TYPE_DEFAULT); in nfs4_acl_posix_to_nfsv4() 170 return acl; in nfs4_acl_posix_to_nfsv4() 183 summarize_posix_acl(struct posix_acl *acl, struct posix_acl_summary *pas) in summarize_posix_acl() argument 195 pe = acl->a_entries + acl->a_count; in summarize_posix_acl() 197 FOREACH_ACL_ENTRY(pa, acl, pe) { in summarize_posix_acl() 227 _posix_to_nfsv4_one(struct posix_acl *pacl, struct nfs4_acl *acl, in _posix_to_nfsv4_one() argument [all …]
|
D | nfs3acl.c | 35 struct posix_acl *acl; in nfsd3_proc_getacl() local 48 acl = nfsd_get_posix_acl(fh, ACL_TYPE_ACCESS); in nfsd3_proc_getacl() 49 if (IS_ERR(acl)) { in nfsd3_proc_getacl() 50 int err = PTR_ERR(acl); in nfsd3_proc_getacl() 53 acl = NULL; in nfsd3_proc_getacl() 59 if (acl == NULL) { in nfsd3_proc_getacl() 63 acl = posix_acl_from_mode(inode->i_mode, GFP_KERNEL); in nfsd3_proc_getacl() 65 resp->acl_access = acl; in nfsd3_proc_getacl() 71 acl = nfsd_get_posix_acl(fh, ACL_TYPE_DEFAULT); in nfsd3_proc_getacl() 72 if (IS_ERR(acl)) { in nfsd3_proc_getacl() [all …]
|
D | nfs2acl.c | 37 struct posix_acl *acl; in nfsacld_proc_getacl() local 52 acl = nfsd_get_posix_acl(fh, ACL_TYPE_ACCESS); in nfsacld_proc_getacl() 53 if (IS_ERR(acl)) { in nfsacld_proc_getacl() 54 int err = PTR_ERR(acl); in nfsacld_proc_getacl() 57 acl = NULL; in nfsacld_proc_getacl() 63 if (acl == NULL) { in nfsacld_proc_getacl() 67 acl = posix_acl_from_mode(inode->i_mode, GFP_KERNEL); in nfsacld_proc_getacl() 69 resp->acl_access = acl; in nfsacld_proc_getacl() 75 acl = nfsd_get_posix_acl(fh, ACL_TYPE_DEFAULT); in nfsacld_proc_getacl() 76 if (IS_ERR(acl)) { in nfsacld_proc_getacl() [all …]
|
D | vfs.c | 459 struct nfs4_acl *acl) in nfsd4_set_nfs4_acl() argument 478 host_error = nfs4_acl_nfsv4_to_posix(acl, &pacl, &dpacl, flags); in nfsd4_set_nfs4_acl() 520 nfsd4_get_nfs4_acl(struct svc_rqst *rqstp, struct dentry *dentry, struct nfs4_acl **acl) in nfsd4_get_nfs4_acl() argument 548 *acl = nfs4_acl_posix_to_nfsv4(pacl, dpacl, flags); in nfsd4_get_nfs4_acl() 549 if (IS_ERR(*acl)) { in nfsd4_get_nfs4_acl() 550 error = PTR_ERR(*acl); in nfsd4_get_nfs4_acl() 551 *acl = NULL; in nfsd4_get_nfs4_acl() 2130 struct posix_acl *acl; in nfsd_get_posix_acl() local 2150 acl = posix_acl_from_xattr(value, size); in nfsd_get_posix_acl() 2152 return acl; in nfsd_get_posix_acl() [all …]
|
D | nfs4xdr.c | 250 struct nfs4_acl **acl) in nfsd4_decode_fattr() argument 290 *acl = nfs4_acl_new(nace); in nfsd4_decode_fattr() 291 if (*acl == NULL) { in nfsd4_decode_fattr() 295 defer_free(argp, kfree, *acl); in nfsd4_decode_fattr() 297 (*acl)->naces = nace; in nfsd4_decode_fattr() 298 for (ace = (*acl)->aces; ace < (*acl)->aces + nace; ace++) { in nfsd4_decode_fattr() 321 *acl = NULL; in nfsd4_decode_fattr() 1427 struct nfs4_acl *acl = NULL; in nfsd4_encode_fattr() local 1459 err = nfsd4_get_nfs4_acl(rqstp, dentry, &acl); in nfsd4_encode_fattr() 1584 if (acl == NULL) { in nfsd4_encode_fattr() [all …]
|
/fs/xfs/ |
D | xfs_acl.c | 211 void *acl, in xfs_acl_vget() argument 217 posix_acl_xattr_header *ext_acl = acl; in xfs_acl_vget() 272 void *acl, in xfs_acl_vset() argument 276 posix_acl_xattr_header *ext_acl = acl; in xfs_acl_vset() 281 if (!acl) in xfs_acl_vset() 329 xfs_acl_t *acl; in xfs_acl_iaccess() local 333 if (!(_ACL_ALLOC(acl))) in xfs_acl_iaccess() 338 if (xfs_attr_fetch(ip, &acl_name, (char *)acl, &rval, ATTR_ROOT)) { in xfs_acl_iaccess() 339 _ACL_FREE(acl); in xfs_acl_iaccess() 342 xfs_acl_get_endian(acl); in xfs_acl_iaccess() [all …]
|
/fs/xfs/linux-2.6/ |
D | xfs_xattr.c | 54 int acl; in xfs_xattr_system_get() local 56 acl = xfs_decode_acl(name); in xfs_xattr_system_get() 57 if (acl < 0) in xfs_xattr_system_get() 58 return acl; in xfs_xattr_system_get() 60 return xfs_acl_vget(inode, buffer, size, acl); in xfs_xattr_system_get() 67 int acl; in xfs_xattr_system_set() local 69 acl = xfs_decode_acl(name); in xfs_xattr_system_set() 70 if (acl < 0) in xfs_xattr_system_set() 71 return acl; in xfs_xattr_system_set() 76 return xfs_acl_vremove(inode, acl); in xfs_xattr_system_set() [all …]
|