Home
last modified time | relevance | path

Searched refs:acl (Results 1 – 25 of 68) sorted by relevance

123

/fs/9p/
Dacl.c32 struct posix_acl *acl = NULL; in __v9fs_get_acl() local
41 acl = posix_acl_from_xattr(&init_user_ns, value, size); in __v9fs_get_acl()
42 if (IS_ERR(acl)) in __v9fs_get_acl()
47 acl = NULL; in __v9fs_get_acl()
49 acl = ERR_PTR(-EIO); in __v9fs_get_acl()
53 return acl; in __v9fs_get_acl()
90 struct posix_acl *acl; in v9fs_get_cached_acl() local
95 acl = get_cached_acl(inode, type); in v9fs_get_cached_acl()
96 BUG_ON(acl == ACL_NOT_CACHED); in v9fs_get_cached_acl()
97 return acl; in v9fs_get_cached_acl()
[all …]
Dacl.h25 extern void v9fs_put_acl(struct posix_acl *dacl, struct posix_acl *acl);
39 struct posix_acl *acl) in v9fs_set_create_acl() argument
44 struct posix_acl *acl) in v9fs_put_acl() argument
/fs/
Dposix_acl.c40 struct posix_acl *acl = ACCESS_ONCE(*p); in get_cached_acl() local
41 if (acl) { in get_cached_acl()
43 acl = *p; in get_cached_acl()
44 if (acl != ACL_NOT_CACHED) in get_cached_acl()
45 acl = posix_acl_dup(acl); in get_cached_acl()
48 return acl; in get_cached_acl()
58 void set_cached_acl(struct inode *inode, int type, struct posix_acl *acl) in set_cached_acl() argument
64 rcu_assign_pointer(*p, posix_acl_dup(acl)); in set_cached_acl()
101 struct posix_acl *acl; in get_acl() local
103 acl = get_cached_acl(inode, type); in get_acl()
[all …]
/fs/reiserfs/
Dxattr_acl.c16 struct posix_acl *acl);
20 reiserfs_set_acl(struct inode *inode, struct posix_acl *acl, int type) in reiserfs_set_acl() argument
25 int size = acl ? posix_acl_xattr_size(acl->a_count) : 0; in reiserfs_set_acl()
40 if (type == ACL_TYPE_ACCESS && acl) { in reiserfs_set_acl()
42 &acl); in reiserfs_set_acl()
46 error = __reiserfs_set_acl(&th, inode, type, acl); in reiserfs_set_acl()
65 struct posix_acl *acl; in reiserfs_posix_acl_from_disk() local
80 acl = posix_acl_alloc(count, GFP_NOFS); in reiserfs_posix_acl_from_disk()
81 if (!acl) in reiserfs_posix_acl_from_disk()
87 acl->a_entries[n].e_tag = le16_to_cpu(entry->e_tag); in reiserfs_posix_acl_from_disk()
[all …]
/fs/ocfs2/
Dacl.c46 struct posix_acl *acl; in ocfs2_acl_from_xattr() local
55 acl = posix_acl_alloc(count, GFP_NOFS); in ocfs2_acl_from_xattr()
56 if (!acl) in ocfs2_acl_from_xattr()
62 acl->a_entries[n].e_tag = le16_to_cpu(entry->e_tag); in ocfs2_acl_from_xattr()
63 acl->a_entries[n].e_perm = le16_to_cpu(entry->e_perm); in ocfs2_acl_from_xattr()
64 switch(acl->a_entries[n].e_tag) { in ocfs2_acl_from_xattr()
66 acl->a_entries[n].e_uid = in ocfs2_acl_from_xattr()
71 acl->a_entries[n].e_gid = in ocfs2_acl_from_xattr()
81 return acl; in ocfs2_acl_from_xattr()
87 static void *ocfs2_acl_to_xattr(const struct posix_acl *acl, size_t *size) in ocfs2_acl_to_xattr() argument
[all …]
Dacl.h30 int ocfs2_iop_set_acl(struct inode *inode, struct posix_acl *acl, int type);
35 struct posix_acl *acl,
/fs/f2fs/
Dacl.c51 struct posix_acl *acl; in f2fs_acl_from_disk() local
65 acl = posix_acl_alloc(count, GFP_NOFS); in f2fs_acl_from_disk()
66 if (!acl) in f2fs_acl_from_disk()
74 acl->a_entries[i].e_tag = le16_to_cpu(entry->e_tag); in f2fs_acl_from_disk()
75 acl->a_entries[i].e_perm = le16_to_cpu(entry->e_perm); in f2fs_acl_from_disk()
77 switch (acl->a_entries[i].e_tag) { in f2fs_acl_from_disk()
87 acl->a_entries[i].e_uid = in f2fs_acl_from_disk()
94 acl->a_entries[i].e_gid = in f2fs_acl_from_disk()
106 return acl; in f2fs_acl_from_disk()
108 posix_acl_release(acl); in f2fs_acl_from_disk()
[all …]
/fs/ext2/
Dacl.c23 struct posix_acl *acl; in ext2_acl_from_disk() local
38 acl = posix_acl_alloc(count, GFP_KERNEL); in ext2_acl_from_disk()
39 if (!acl) in ext2_acl_from_disk()
46 acl->a_entries[n].e_tag = le16_to_cpu(entry->e_tag); in ext2_acl_from_disk()
47 acl->a_entries[n].e_perm = le16_to_cpu(entry->e_perm); in ext2_acl_from_disk()
48 switch(acl->a_entries[n].e_tag) { in ext2_acl_from_disk()
61 acl->a_entries[n].e_uid = in ext2_acl_from_disk()
69 acl->a_entries[n].e_gid = in ext2_acl_from_disk()
80 return acl; in ext2_acl_from_disk()
83 posix_acl_release(acl); in ext2_acl_from_disk()
[all …]
DKconfig17 <http://acl.bestbits.at/> for details).
30 Linux website <http://acl.bestbits.at/>.
/fs/ext4/
Dacl.c20 struct posix_acl *acl; in ext4_acl_from_disk() local
35 acl = posix_acl_alloc(count, GFP_NOFS); in ext4_acl_from_disk()
36 if (!acl) in ext4_acl_from_disk()
43 acl->a_entries[n].e_tag = le16_to_cpu(entry->e_tag); in ext4_acl_from_disk()
44 acl->a_entries[n].e_perm = le16_to_cpu(entry->e_perm); in ext4_acl_from_disk()
46 switch (acl->a_entries[n].e_tag) { in ext4_acl_from_disk()
59 acl->a_entries[n].e_uid = in ext4_acl_from_disk()
67 acl->a_entries[n].e_gid = in ext4_acl_from_disk()
78 return acl; in ext4_acl_from_disk()
81 posix_acl_release(acl); in ext4_acl_from_disk()
[all …]
/fs/ceph/
Dacl.c33 int type, struct posix_acl *acl) in ceph_set_cached_acl() argument
39 set_cached_acl(inode, type, acl); in ceph_set_cached_acl()
48 struct posix_acl *acl; in ceph_get_acl() local
70 acl = posix_acl_from_xattr(&init_user_ns, value, size); in ceph_get_acl()
72 acl = NULL; in ceph_get_acl()
74 acl = ERR_PTR(-EIO); in ceph_get_acl()
78 if (!IS_ERR(acl)) in ceph_get_acl()
79 ceph_set_cached_acl(inode, type, acl); in ceph_get_acl()
81 return acl; in ceph_get_acl()
84 int ceph_set_acl(struct inode *inode, struct posix_acl *acl, int type) in ceph_set_acl() argument
[all …]
/fs/jffs2/
Dacl.c60 struct posix_acl *acl; in jffs2_acl_from_medium() local
81 acl = posix_acl_alloc(count, GFP_KERNEL); in jffs2_acl_from_medium()
82 if (!acl) in jffs2_acl_from_medium()
89 acl->a_entries[i].e_tag = je16_to_cpu(entry->e_tag); in jffs2_acl_from_medium()
90 acl->a_entries[i].e_perm = je16_to_cpu(entry->e_perm); in jffs2_acl_from_medium()
91 switch (acl->a_entries[i].e_tag) { in jffs2_acl_from_medium()
103 acl->a_entries[i].e_uid = in jffs2_acl_from_medium()
111 acl->a_entries[i].e_gid = in jffs2_acl_from_medium()
122 return acl; in jffs2_acl_from_medium()
124 posix_acl_release(acl); in jffs2_acl_from_medium()
[all …]
/fs/nfs_common/
Dnfsacl.c36 struct posix_acl *acl; member
43 struct posix_acl acl; member
55 &nfsacl_desc->acl->a_entries[nfsacl_desc->count++]; in xdr_nfsace_encode()
92 struct posix_acl *acl, int encode_entries, int typeflag) in nfsacl_encode() argument
94 int entries = (acl && acl->a_count) ? max_t(int, acl->a_count, 4) : 0; in nfsacl_encode()
101 .acl = acl, in nfsacl_encode()
112 if (encode_entries && acl && acl->a_count == 3) { in nfsacl_encode()
113 struct posix_acl *acl2 = &aclbuf.acl; in nfsacl_encode()
123 acl2->a_entries[0] = acl->a_entries[0]; /* ACL_USER_OBJ */ in nfsacl_encode()
124 acl2->a_entries[1] = acl->a_entries[1]; /* ACL_GROUP_OBJ */ in nfsacl_encode()
[all …]
/fs/jfs/
Dacl.c32 struct posix_acl *acl; in jfs_get_acl() local
37 acl = get_cached_acl(inode, type); in jfs_get_acl()
38 if (acl != ACL_NOT_CACHED) in jfs_get_acl()
39 return acl; in jfs_get_acl()
63 acl = NULL; in jfs_get_acl()
65 acl = ERR_PTR(size); in jfs_get_acl()
67 acl = posix_acl_from_xattr(&init_user_ns, value, size); in jfs_get_acl()
70 if (!IS_ERR(acl)) in jfs_get_acl()
71 set_cached_acl(inode, type, acl); in jfs_get_acl()
72 return acl; in jfs_get_acl()
[all …]
/fs/btrfs/
Dacl.c36 struct posix_acl *acl; in btrfs_get_acl() local
57 acl = posix_acl_from_xattr(&init_user_ns, value, size); in btrfs_get_acl()
60 acl = NULL; in btrfs_get_acl()
62 acl = ERR_PTR(-EIO); in btrfs_get_acl()
66 if (!IS_ERR(acl)) in btrfs_get_acl()
67 set_cached_acl(inode, type, acl); in btrfs_get_acl()
69 return acl; in btrfs_get_acl()
76 struct inode *inode, struct posix_acl *acl, int type) in __btrfs_set_acl() argument
88 return acl ? -EINVAL : 0; in __btrfs_set_acl()
95 if (acl) { in __btrfs_set_acl()
[all …]
/fs/hfsplus/
Dposix_acl.c15 struct posix_acl *acl; in hfsplus_get_posix_acl() local
43 acl = posix_acl_from_xattr(&init_user_ns, value, size); in hfsplus_get_posix_acl()
45 acl = NULL; in hfsplus_get_posix_acl()
47 acl = ERR_PTR(size); in hfsplus_get_posix_acl()
51 if (!IS_ERR(acl)) in hfsplus_get_posix_acl()
52 set_cached_acl(inode, type, acl); in hfsplus_get_posix_acl()
54 return acl; in hfsplus_get_posix_acl()
57 int hfsplus_set_posix_acl(struct inode *inode, struct posix_acl *acl, in hfsplus_set_posix_acl() argument
70 if (acl) { in hfsplus_set_posix_acl()
71 err = posix_acl_update_mode(inode, &inode->i_mode, &acl); in hfsplus_set_posix_acl()
[all …]
/fs/xfs/
Dxfs_acl.c45 struct posix_acl *acl; in xfs_acl_from_disk() local
55 acl = posix_acl_alloc(count, GFP_KERNEL); in xfs_acl_from_disk()
56 if (!acl) in xfs_acl_from_disk()
60 acl_e = &acl->a_entries[i]; in xfs_acl_from_disk()
88 return acl; in xfs_acl_from_disk()
91 posix_acl_release(acl); in xfs_acl_from_disk()
96 xfs_acl_to_disk(struct xfs_acl *aclp, const struct posix_acl *acl) in xfs_acl_to_disk() argument
102 aclp->acl_cnt = cpu_to_be32(acl->a_count); in xfs_acl_to_disk()
103 for (i = 0; i < acl->a_count; i++) { in xfs_acl_to_disk()
105 acl_e = &acl->a_entries[i]; in xfs_acl_to_disk()
[all …]
/fs/nfs/
Dnfs3acl.c117 static int __nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl, in __nfs3_proc_setacls() argument
126 .acl_access = acl, in __nfs3_proc_setacls()
135 if (acl == NULL && (!S_ISDIR(inode->i_mode) || dfacl == NULL)) in __nfs3_proc_setacls()
145 if (acl != NULL && acl->a_count > NFS_ACL_MAX_ENTRIES) in __nfs3_proc_setacls()
152 args.len = nfsacl_size(acl, dfacl); in __nfs3_proc_setacls()
154 args.len = nfsacl_size(acl, NULL); in __nfs3_proc_setacls()
184 set_cached_acl(inode, ACL_TYPE_ACCESS, acl); in __nfs3_proc_setacls()
205 int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl, in nfs3_proc_setacls() argument
209 ret = __nfs3_proc_setacls(inode, acl, dfacl); in nfs3_proc_setacls()
214 int nfs3_set_acl(struct inode *inode, struct posix_acl *acl, int type) in nfs3_set_acl() argument
[all …]
Dnfs3_fs.h14 extern int nfs3_set_acl(struct inode *inode, struct posix_acl *acl, int type);
15 extern int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl,
20 static inline int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl, in nfs3_proc_setacls() argument
Dnfs3proc.c322 struct posix_acl *default_acl, *acl; in nfs3_proc_create() local
345 status = posix_acl_create(dir, &sattr->ia_mode, &default_acl, &acl); in nfs3_proc_create()
395 status = nfs3_proc_setacls(d_inode(dentry), acl, default_acl); in nfs3_proc_create()
398 posix_acl_release(acl); in nfs3_proc_create()
549 struct posix_acl *default_acl, *acl; in nfs3_proc_mkdir() local
559 status = posix_acl_create(dir, &sattr->ia_mode, &default_acl, &acl); in nfs3_proc_mkdir()
573 status = nfs3_proc_setacls(d_inode(dentry), acl, default_acl); in nfs3_proc_mkdir()
576 posix_acl_release(acl); in nfs3_proc_mkdir()
674 struct posix_acl *default_acl, *acl; in nfs3_proc_mknod() local
685 status = posix_acl_create(dir, &sattr->ia_mode, &default_acl, &acl); in nfs3_proc_mknod()
[all …]
/fs/gfs2/
Dacl.c44 struct posix_acl *acl; in gfs2_get_acl() local
62 acl = posix_acl_from_xattr(&init_user_ns, data, len); in gfs2_get_acl()
64 return acl; in gfs2_get_acl()
67 int gfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type) in gfs2_set_acl() argument
76 if (acl && acl->a_count > GFS2_ACL_MAX_ENTRIES(GFS2_SB(inode))) in gfs2_set_acl()
82 error = posix_acl_update_mode(inode, &inode->i_mode, &acl); in gfs2_set_acl()
89 if (acl) { in gfs2_set_acl()
90 len = posix_acl_to_xattr(&init_user_ns, acl, NULL, 0); in gfs2_set_acl()
96 error = posix_acl_to_xattr(&init_user_ns, acl, data, len); in gfs2_set_acl()
107 set_cached_acl(inode, type, acl); in gfs2_set_acl()
/fs/nfsd/
Dnfs4acl.c130 struct nfs4_acl **acl) in nfsd4_get_nfs4_acl() argument
160 *acl = kmalloc(nfs4_acl_bytes(size), GFP_KERNEL); in nfsd4_get_nfs4_acl()
161 if (*acl == NULL) { in nfsd4_get_nfs4_acl()
165 (*acl)->naces = 0; in nfsd4_get_nfs4_acl()
167 _posix_to_nfsv4_one(pacl, *acl, flags & ~NFS4_ACL_TYPE_DEFAULT); in nfsd4_get_nfs4_acl()
170 _posix_to_nfsv4_one(dpacl, *acl, flags | NFS4_ACL_TYPE_DEFAULT); in nfsd4_get_nfs4_acl()
189 summarize_posix_acl(struct posix_acl *acl, struct posix_acl_summary *pas) in summarize_posix_acl() argument
201 pe = acl->a_entries + acl->a_count; in summarize_posix_acl()
203 FOREACH_ACL_ENTRY(pa, acl, pe) { in summarize_posix_acl()
233 _posix_to_nfsv4_one(struct posix_acl *pacl, struct nfs4_acl *acl, in _posix_to_nfsv4_one() argument
[all …]
Dnfs3acl.c32 struct posix_acl *acl; in nfsd3_proc_getacl() local
49 acl = get_acl(inode, ACL_TYPE_ACCESS); in nfsd3_proc_getacl()
50 if (acl == NULL) { in nfsd3_proc_getacl()
52 acl = posix_acl_from_mode(inode->i_mode, GFP_KERNEL); in nfsd3_proc_getacl()
54 if (IS_ERR(acl)) { in nfsd3_proc_getacl()
55 nfserr = nfserrno(PTR_ERR(acl)); in nfsd3_proc_getacl()
58 resp->acl_access = acl; in nfsd3_proc_getacl()
63 acl = get_acl(inode, ACL_TYPE_DEFAULT); in nfsd3_proc_getacl()
64 if (IS_ERR(acl)) { in nfsd3_proc_getacl()
65 nfserr = nfserrno(PTR_ERR(acl)); in nfsd3_proc_getacl()
[all …]
Dnfs2acl.c33 struct posix_acl *acl; in nfsacld_proc_getacl() local
56 acl = get_acl(inode, ACL_TYPE_ACCESS); in nfsacld_proc_getacl()
57 if (acl == NULL) { in nfsacld_proc_getacl()
59 acl = posix_acl_from_mode(inode->i_mode, GFP_KERNEL); in nfsacld_proc_getacl()
61 if (IS_ERR(acl)) { in nfsacld_proc_getacl()
62 nfserr = nfserrno(PTR_ERR(acl)); in nfsacld_proc_getacl()
65 resp->acl_access = acl; in nfsacld_proc_getacl()
70 acl = get_acl(inode, ACL_TYPE_DEFAULT); in nfsacld_proc_getacl()
71 if (IS_ERR(acl)) { in nfsacld_proc_getacl()
72 nfserr = nfserrno(PTR_ERR(acl)); in nfsacld_proc_getacl()
[all …]
Dacl.h55 struct nfs4_acl **acl);
57 struct nfs4_acl *acl);

123