Home
last modified time | relevance | path

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

12345

/Linux-v4.19/drivers/target/
Dtarget_core_tpg.c59 struct se_node_acl *acl; in __core_tpg_get_initiator_node_acl() local
61 list_for_each_entry(acl, &tpg->acl_node_list, acl_list) { in __core_tpg_get_initiator_node_acl()
62 if (!strcmp(acl->initiatorname, initiatorname)) in __core_tpg_get_initiator_node_acl()
63 return acl; in __core_tpg_get_initiator_node_acl()
77 struct se_node_acl *acl; in core_tpg_get_initiator_node_acl() local
88 acl = __core_tpg_get_initiator_node_acl(tpg, initiatorname); in core_tpg_get_initiator_node_acl()
89 if (acl) { in core_tpg_get_initiator_node_acl()
90 if (!kref_get_unless_zero(&acl->acl_kref)) in core_tpg_get_initiator_node_acl()
91 acl = NULL; in core_tpg_get_initiator_node_acl()
95 return acl; in core_tpg_get_initiator_node_acl()
[all …]
/Linux-v4.19/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(is_uncached_acl(acl)); in v9fs_get_cached_acl()
97 return acl; in v9fs_get_cached_acl()
[all …]
/Linux-v4.19/fs/
Dposix_acl.c40 struct posix_acl *acl; in get_cached_acl() local
44 acl = rcu_dereference(*p); in get_cached_acl()
45 if (!acl || is_uncached_acl(acl) || in get_cached_acl()
46 refcount_inc_not_zero(&acl->a_refcount)) in get_cached_acl()
52 return acl; in get_cached_acl()
62 void set_cached_acl(struct inode *inode, int type, struct posix_acl *acl) in set_cached_acl() argument
67 old = xchg(p, posix_acl_dup(acl)); in set_cached_acl()
99 struct posix_acl *acl; in get_acl() local
107 acl = get_cached_acl(inode, type); in get_acl()
108 if (!is_uncached_acl(acl)) in get_acl()
[all …]
/Linux-v4.19/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 …]
/Linux-v4.19/fs/reiserfs/
Dxattr_acl.c17 struct posix_acl *acl);
21 reiserfs_set_acl(struct inode *inode, struct posix_acl *acl, int type) in reiserfs_set_acl() argument
26 int size = acl ? posix_acl_xattr_size(acl->a_count) : 0; in reiserfs_set_acl()
42 if (type == ACL_TYPE_ACCESS && acl) { in reiserfs_set_acl()
43 error = posix_acl_update_mode(inode, &mode, &acl); in reiserfs_set_acl()
48 error = __reiserfs_set_acl(&th, inode, type, acl); in reiserfs_set_acl()
69 struct posix_acl *acl; in reiserfs_posix_acl_from_disk() local
84 acl = posix_acl_alloc(count, GFP_NOFS); in reiserfs_posix_acl_from_disk()
85 if (!acl) in reiserfs_posix_acl_from_disk()
91 acl->a_entries[n].e_tag = le16_to_cpu(entry->e_tag); in reiserfs_posix_acl_from_disk()
[all …]
/Linux-v4.19/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 …]
/Linux-v4.19/fs/ext2/
Dacl.c24 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()
62 acl->a_entries[n].e_uid = in ext2_acl_from_disk()
70 acl->a_entries[n].e_gid = in ext2_acl_from_disk()
81 return acl; in ext2_acl_from_disk()
84 posix_acl_release(acl); in ext2_acl_from_disk()
[all …]
/Linux-v4.19/fs/ext4/
Dacl.c22 struct posix_acl *acl; in ext4_acl_from_disk() local
37 acl = posix_acl_alloc(count, GFP_NOFS); in ext4_acl_from_disk()
38 if (!acl) in ext4_acl_from_disk()
45 acl->a_entries[n].e_tag = le16_to_cpu(entry->e_tag); in ext4_acl_from_disk()
46 acl->a_entries[n].e_perm = le16_to_cpu(entry->e_perm); in ext4_acl_from_disk()
48 switch (acl->a_entries[n].e_tag) { in ext4_acl_from_disk()
61 acl->a_entries[n].e_uid = in ext4_acl_from_disk()
69 acl->a_entries[n].e_gid = in ext4_acl_from_disk()
80 return acl; in ext4_acl_from_disk()
83 posix_acl_release(acl); in ext4_acl_from_disk()
[all …]
/Linux-v4.19/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()
51 struct posix_acl *acl; in ceph_get_acl() local
81 acl = posix_acl_from_xattr(&init_user_ns, value, size); in ceph_get_acl()
83 acl = NULL; in ceph_get_acl()
87 acl = ERR_PTR(-EIO); in ceph_get_acl()
92 if (!IS_ERR(acl)) in ceph_get_acl()
93 ceph_set_cached_acl(inode, type, acl); in ceph_get_acl()
95 return acl; in ceph_get_acl()
98 int ceph_set_acl(struct inode *inode, struct posix_acl *acl, int type) in ceph_set_acl() argument
[all …]
/Linux-v4.19/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 …]
/Linux-v4.19/fs/btrfs/
Dacl.c23 struct posix_acl *acl; in btrfs_get_acl() local
44 acl = posix_acl_from_xattr(&init_user_ns, value, size); in btrfs_get_acl()
46 acl = NULL; in btrfs_get_acl()
48 acl = ERR_PTR(size); in btrfs_get_acl()
51 return acl; in btrfs_get_acl()
55 struct inode *inode, struct posix_acl *acl, int type) in __btrfs_set_acl() argument
67 return acl ? -EINVAL : 0; in __btrfs_set_acl()
74 if (acl) { in __btrfs_set_acl()
75 size = posix_acl_xattr_size(acl->a_count); in __btrfs_set_acl()
82 ret = posix_acl_to_xattr(&init_user_ns, acl, value, size); in __btrfs_set_acl()
[all …]
/Linux-v4.19/drivers/target/iscsi/
Discsi_target_nodeattrib.c36 struct iscsi_node_acl *acl, in iscsit_set_default_node_attribues() argument
39 struct iscsi_node_attrib *a = &acl->node_attrib; in iscsit_set_default_node_attribues()
52 struct iscsi_node_acl *acl, in iscsit_na_dataout_timeout() argument
55 struct iscsi_node_attrib *a = &acl->node_attrib; in iscsit_na_dataout_timeout()
71 " %s\n", a->dataout_timeout, iscsit_na_get_initiatorname(acl)); in iscsit_na_dataout_timeout()
77 struct iscsi_node_acl *acl, in iscsit_na_dataout_timeout_retries() argument
80 struct iscsi_node_attrib *a = &acl->node_attrib; in iscsit_na_dataout_timeout_retries()
97 iscsit_na_get_initiatorname(acl)); in iscsit_na_dataout_timeout_retries()
103 struct iscsi_node_acl *acl, in iscsit_na_nopin_timeout() argument
106 struct iscsi_node_attrib *a = &acl->node_attrib; in iscsit_na_nopin_timeout()
[all …]
/Linux-v4.19/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 …]
/Linux-v4.19/fs/orangefs/
Dacl.c15 struct posix_acl *acl; in orangefs_get_acl() local
50 acl = posix_acl_from_xattr(&init_user_ns, value, ret); in orangefs_get_acl()
52 acl = NULL; in orangefs_get_acl()
57 acl = ERR_PTR(ret); in orangefs_get_acl()
61 return acl; in orangefs_get_acl()
64 static int __orangefs_set_acl(struct inode *inode, struct posix_acl *acl, in __orangefs_set_acl() argument
90 if (acl) { in __orangefs_set_acl()
91 size = posix_acl_xattr_size(acl->a_count); in __orangefs_set_acl()
96 error = posix_acl_to_xattr(&init_user_ns, acl, value, size); in __orangefs_set_acl()
103 __func__, name, value, size, acl); in __orangefs_set_acl()
[all …]
/Linux-v4.19/fs/xfs/
Dxfs_acl.c33 struct posix_acl *acl; in xfs_acl_from_disk() local
43 acl = posix_acl_alloc(count, GFP_KERNEL); in xfs_acl_from_disk()
44 if (!acl) in xfs_acl_from_disk()
48 acl_e = &acl->a_entries[i]; in xfs_acl_from_disk()
76 return acl; in xfs_acl_from_disk()
79 posix_acl_release(acl); in xfs_acl_from_disk()
84 xfs_acl_to_disk(struct xfs_acl *aclp, const struct posix_acl *acl) in xfs_acl_to_disk() argument
90 aclp->acl_cnt = cpu_to_be32(acl->a_count); in xfs_acl_to_disk()
91 for (i = 0; i < acl->a_count; i++) { in xfs_acl_to_disk()
93 acl_e = &acl->a_entries[i]; in xfs_acl_to_disk()
[all …]
/Linux-v4.19/fs/jfs/
Dacl.c32 struct posix_acl *acl; in jfs_get_acl() local
59 acl = NULL; in jfs_get_acl()
61 acl = ERR_PTR(size); in jfs_get_acl()
63 acl = posix_acl_from_xattr(&init_user_ns, value, size); in jfs_get_acl()
66 return acl; in jfs_get_acl()
70 struct posix_acl *acl) in __jfs_set_acl() argument
88 if (acl) { in __jfs_set_acl()
89 size = posix_acl_xattr_size(acl->a_count); in __jfs_set_acl()
93 rc = posix_acl_to_xattr(&init_user_ns, acl, value, size); in __jfs_set_acl()
102 set_cached_acl(inode, type, acl); in __jfs_set_acl()
[all …]
/Linux-v4.19/fs/gfs2/
Dacl.c45 struct posix_acl *acl; in __gfs2_get_acl() local
57 acl = posix_acl_from_xattr(&init_user_ns, data, len); in __gfs2_get_acl()
59 return acl; in __gfs2_get_acl()
67 struct posix_acl *acl; in gfs2_get_acl() local
76 acl = __gfs2_get_acl(inode, type); in gfs2_get_acl()
79 return acl; in gfs2_get_acl()
82 int __gfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type) in __gfs2_set_acl() argument
89 if (acl) { in __gfs2_set_acl()
90 len = posix_acl_xattr_size(acl->a_count); in __gfs2_set_acl()
94 error = posix_acl_to_xattr(&init_user_ns, acl, data, len); in __gfs2_set_acl()
[all …]
/Linux-v4.19/drivers/net/ethernet/mellanox/mlxsw/
Dspectrum_acl.c36 struct mlxsw_afk *mlxsw_sp_acl_afk(struct mlxsw_sp_acl *acl) in mlxsw_sp_acl_afk() argument
38 return acl->afk; in mlxsw_sp_acl_afk()
100 return mlxsw_sp->acl->dummy_fid; in mlxsw_sp_acl_dummy_fid()
303 struct mlxsw_sp_acl *acl = mlxsw_sp->acl; in mlxsw_sp_acl_ruleset_create() local
321 err = ops->ruleset_add(mlxsw_sp, &acl->tcam, ruleset->priv, in mlxsw_sp_acl_ruleset_create()
326 err = rhashtable_insert_fast(&acl->ruleset_ht, &ruleset->ht_node, in mlxsw_sp_acl_ruleset_create()
346 struct mlxsw_sp_acl *acl = mlxsw_sp->acl; in mlxsw_sp_acl_ruleset_destroy() local
348 rhashtable_remove_fast(&acl->ruleset_ht, &ruleset->ht_node, in mlxsw_sp_acl_ruleset_destroy()
369 __mlxsw_sp_acl_ruleset_lookup(struct mlxsw_sp_acl *acl, in __mlxsw_sp_acl_ruleset_lookup() argument
379 return rhashtable_lookup_fast(&acl->ruleset_ht, &ht_key, in __mlxsw_sp_acl_ruleset_lookup()
[all …]
/Linux-v4.19/include/linux/
Dposix_acl.h34 #define FOREACH_ACL_ENTRY(pa, acl, pe) \ argument
35 for(pa=(acl)->a_entries, pe=pa+(acl)->a_count; pa<pe; pa++)
42 posix_acl_dup(struct posix_acl *acl) in posix_acl_dup() argument
44 if (acl) in posix_acl_dup()
45 refcount_inc(&acl->a_refcount); in posix_acl_dup()
46 return acl; in posix_acl_dup()
53 posix_acl_release(struct posix_acl *acl) in posix_acl_release() argument
55 if (acl && refcount_dec_and_test(&acl->a_refcount)) in posix_acl_release()
56 kfree_rcu(acl, a_rcu); in posix_acl_release()
85 void set_cached_acl(struct inode *inode, int type, struct posix_acl *acl);
[all …]
/Linux-v4.19/fs/nfs/
Dnfs3acl.c29 static void nfs3_complete_get_acl(struct posix_acl **p, struct posix_acl *acl) in nfs3_complete_get_acl() argument
34 posix_acl_dup(acl); in nfs3_complete_get_acl()
35 if (cmpxchg(p, sentinel, acl) != sentinel) in nfs3_complete_get_acl()
36 posix_acl_release(acl); in nfs3_complete_get_acl()
158 static int __nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl, in __nfs3_proc_setacls() argument
167 .acl_access = acl, in __nfs3_proc_setacls()
176 if (acl == NULL && (!S_ISDIR(inode->i_mode) || dfacl == NULL)) in __nfs3_proc_setacls()
186 if (acl != NULL && acl->a_count > NFS_ACL_MAX_ENTRIES) in __nfs3_proc_setacls()
193 args.len = nfsacl_size(acl, dfacl); in __nfs3_proc_setacls()
195 args.len = nfsacl_size(acl, NULL); in __nfs3_proc_setacls()
[all …]
/Linux-v4.19/fs/fuse/
Dacl.c20 struct posix_acl *acl; in fuse_get_acl() local
37 acl = posix_acl_from_xattr(fc->user_ns, value, size); in fuse_get_acl()
40 acl = NULL; in fuse_get_acl()
42 acl = ERR_PTR(-E2BIG); in fuse_get_acl()
44 acl = ERR_PTR(size); in fuse_get_acl()
47 return acl; in fuse_get_acl()
50 int fuse_set_acl(struct inode *inode, struct posix_acl *acl, int type) in fuse_set_acl() argument
66 if (acl) { in fuse_set_acl()
74 size_t size = posix_acl_xattr_size(acl->a_count); in fuse_set_acl()
84 ret = posix_acl_to_xattr(fc->user_ns, acl, value, size); in fuse_set_acl()
/Linux-v4.19/security/tomoyo/
Dgc.c51 head->r.acl == element || &head->w.domain->list == element) in tomoyo_struct_used_by_io_buffer()
153 struct tomoyo_acl_info *acl = in tomoyo_del_acl() local
154 container_of(element, typeof(*acl), list); in tomoyo_del_acl()
155 tomoyo_put_condition(acl->cond); in tomoyo_del_acl()
156 switch (acl->type) { in tomoyo_del_acl()
160 = container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
167 = container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
175 = container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
183 = container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
193 = container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
[all …]
Dfile.c254 const struct tomoyo_path_acl *acl = container_of(ptr, typeof(*acl), in tomoyo_check_path_acl() local
256 if (acl->perm & (1 << r->param.path.operation)) { in tomoyo_check_path_acl()
259 &acl->name); in tomoyo_check_path_acl()
276 const struct tomoyo_path_number_acl *acl = in tomoyo_check_path_number_acl() local
277 container_of(ptr, typeof(*acl), head); in tomoyo_check_path_number_acl()
278 return (acl->perm & (1 << r->param.path_number.operation)) && in tomoyo_check_path_number_acl()
280 &acl->number) && in tomoyo_check_path_number_acl()
282 &acl->name); in tomoyo_check_path_number_acl()
296 const struct tomoyo_path2_acl *acl = in tomoyo_check_path2_acl() local
297 container_of(ptr, typeof(*acl), head); in tomoyo_check_path2_acl()
[all …]
/Linux-v4.19/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.c34 struct posix_acl *acl; in nfsd3_proc_getacl() local
51 acl = get_acl(inode, ACL_TYPE_ACCESS); in nfsd3_proc_getacl()
52 if (acl == NULL) { in nfsd3_proc_getacl()
54 acl = posix_acl_from_mode(inode->i_mode, GFP_KERNEL); in nfsd3_proc_getacl()
56 if (IS_ERR(acl)) { in nfsd3_proc_getacl()
57 nfserr = nfserrno(PTR_ERR(acl)); in nfsd3_proc_getacl()
60 resp->acl_access = acl; in nfsd3_proc_getacl()
65 acl = get_acl(inode, ACL_TYPE_DEFAULT); in nfsd3_proc_getacl()
66 if (IS_ERR(acl)) { in nfsd3_proc_getacl()
67 nfserr = nfserrno(PTR_ERR(acl)); in nfsd3_proc_getacl()
[all …]

12345