Home
last modified time | relevance | path

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

123456

/Linux-v5.15/drivers/target/
Dtarget_core_tpg.c43 struct se_node_acl *acl; in __core_tpg_get_initiator_node_acl() local
45 list_for_each_entry(acl, &tpg->acl_node_list, acl_list) { in __core_tpg_get_initiator_node_acl()
46 if (!strcmp(acl->initiatorname, initiatorname)) in __core_tpg_get_initiator_node_acl()
47 return acl; in __core_tpg_get_initiator_node_acl()
61 struct se_node_acl *acl; in core_tpg_get_initiator_node_acl() local
72 acl = __core_tpg_get_initiator_node_acl(tpg, initiatorname); in core_tpg_get_initiator_node_acl()
73 if (acl) { in core_tpg_get_initiator_node_acl()
74 if (!kref_get_unless_zero(&acl->acl_kref)) in core_tpg_get_initiator_node_acl()
75 acl = NULL; in core_tpg_get_initiator_node_acl()
79 return acl; in core_tpg_get_initiator_node_acl()
[all …]
/Linux-v5.15/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-v5.15/fs/
Dposix_acl.c42 struct posix_acl *acl; in get_cached_acl() local
46 acl = rcu_dereference(*p); in get_cached_acl()
47 if (!acl || is_uncached_acl(acl) || in get_cached_acl()
48 refcount_inc_not_zero(&acl->a_refcount)) in get_cached_acl()
54 return acl; in get_cached_acl()
60 struct posix_acl *acl = rcu_dereference(*acl_by_type(inode, type)); in get_cached_acl_rcu() local
62 if (acl == ACL_DONT_CACHE) { in get_cached_acl_rcu()
67 acl = ret; in get_cached_acl_rcu()
70 return acl; in get_cached_acl_rcu()
74 void set_cached_acl(struct inode *inode, int type, struct posix_acl *acl) in set_cached_acl() argument
[all …]
/Linux-v5.15/fs/nfs_common/
Dnfsacl.c37 struct posix_acl *acl; member
44 struct posix_acl acl; member
56 &nfsacl_desc->acl->a_entries[nfsacl_desc->count++]; in xdr_nfsace_encode()
93 struct posix_acl *acl, int encode_entries, int typeflag) in nfsacl_encode() argument
95 int entries = (acl && acl->a_count) ? max_t(int, acl->a_count, 4) : 0; in nfsacl_encode()
102 .acl = acl, in nfsacl_encode()
113 if (encode_entries && acl && acl->a_count == 3) { in nfsacl_encode()
114 struct posix_acl *acl2 = &aclbuf.acl; in nfsacl_encode()
124 acl2->a_entries[0] = acl->a_entries[0]; /* ACL_USER_OBJ */ in nfsacl_encode()
125 acl2->a_entries[1] = acl->a_entries[1]; /* ACL_GROUP_OBJ */ in nfsacl_encode()
[all …]
/Linux-v5.15/fs/reiserfs/
Dxattr_acl.c17 struct posix_acl *acl);
22 struct posix_acl *acl, int type) in reiserfs_set_acl() argument
27 int size = acl ? posix_acl_xattr_size(acl->a_count) : 0; in reiserfs_set_acl()
43 if (type == ACL_TYPE_ACCESS && acl) { in reiserfs_set_acl()
45 &mode, &acl); in reiserfs_set_acl()
50 error = __reiserfs_set_acl(&th, inode, type, acl); in reiserfs_set_acl()
71 struct posix_acl *acl; in reiserfs_posix_acl_from_disk() local
86 acl = posix_acl_alloc(count, GFP_NOFS); in reiserfs_posix_acl_from_disk()
87 if (!acl) in reiserfs_posix_acl_from_disk()
93 acl->a_entries[n].e_tag = le16_to_cpu(entry->e_tag); in reiserfs_posix_acl_from_disk()
[all …]
/Linux-v5.15/fs/ocfs2/
Dacl.c36 struct posix_acl *acl; in ocfs2_acl_from_xattr() local
45 acl = posix_acl_alloc(count, GFP_NOFS); in ocfs2_acl_from_xattr()
46 if (!acl) in ocfs2_acl_from_xattr()
52 acl->a_entries[n].e_tag = le16_to_cpu(entry->e_tag); in ocfs2_acl_from_xattr()
53 acl->a_entries[n].e_perm = le16_to_cpu(entry->e_perm); in ocfs2_acl_from_xattr()
54 switch(acl->a_entries[n].e_tag) { in ocfs2_acl_from_xattr()
56 acl->a_entries[n].e_uid = in ocfs2_acl_from_xattr()
61 acl->a_entries[n].e_gid = in ocfs2_acl_from_xattr()
71 return acl; in ocfs2_acl_from_xattr()
77 static void *ocfs2_acl_to_xattr(const struct posix_acl *acl, size_t *size) in ocfs2_acl_to_xattr() argument
[all …]
/Linux-v5.15/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-v5.15/fs/f2fs/
Dacl.c49 struct posix_acl *acl; in f2fs_acl_from_disk() local
66 acl = posix_acl_alloc(count, GFP_NOFS); in f2fs_acl_from_disk()
67 if (!acl) in f2fs_acl_from_disk()
75 acl->a_entries[i].e_tag = le16_to_cpu(entry->e_tag); in f2fs_acl_from_disk()
76 acl->a_entries[i].e_perm = le16_to_cpu(entry->e_perm); in f2fs_acl_from_disk()
78 switch (acl->a_entries[i].e_tag) { in f2fs_acl_from_disk()
88 acl->a_entries[i].e_uid = in f2fs_acl_from_disk()
95 acl->a_entries[i].e_gid = in f2fs_acl_from_disk()
107 return acl; in f2fs_acl_from_disk()
109 posix_acl_release(acl); in f2fs_acl_from_disk()
[all …]
/Linux-v5.15/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-v5.15/fs/ceph/
Dacl.c20 int type, struct posix_acl *acl) in ceph_set_cached_acl() argument
26 set_cached_acl(inode, type, acl); in ceph_set_cached_acl()
38 struct posix_acl *acl; in ceph_get_acl() local
71 acl = posix_acl_from_xattr(&init_user_ns, value, size); in ceph_get_acl()
73 acl = NULL; in ceph_get_acl()
77 acl = ERR_PTR(-EIO); in ceph_get_acl()
82 if (!IS_ERR(acl)) in ceph_get_acl()
83 ceph_set_cached_acl(inode, type, acl); in ceph_get_acl()
85 return acl; in ceph_get_acl()
89 struct posix_acl *acl, int type) in ceph_set_acl() argument
[all …]
/Linux-v5.15/drivers/target/iscsi/
Discsi_target_nodeattrib.c28 struct iscsi_node_acl *acl, in iscsit_set_default_node_attribues() argument
31 struct iscsi_node_attrib *a = &acl->node_attrib; in iscsit_set_default_node_attribues()
44 struct iscsi_node_acl *acl, in iscsit_na_dataout_timeout() argument
47 struct iscsi_node_attrib *a = &acl->node_attrib; in iscsit_na_dataout_timeout()
63 " %s\n", a->dataout_timeout, iscsit_na_get_initiatorname(acl)); in iscsit_na_dataout_timeout()
69 struct iscsi_node_acl *acl, in iscsit_na_dataout_timeout_retries() argument
72 struct iscsi_node_attrib *a = &acl->node_attrib; in iscsit_na_dataout_timeout_retries()
89 iscsit_na_get_initiatorname(acl)); in iscsit_na_dataout_timeout_retries()
95 struct iscsi_node_acl *acl, in iscsit_na_nopin_timeout() argument
98 struct iscsi_node_attrib *a = &acl->node_attrib; in iscsit_na_nopin_timeout()
[all …]
/Linux-v5.15/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-v5.15/fs/btrfs/
Dacl.c24 struct posix_acl *acl; in btrfs_get_acl() local
48 acl = posix_acl_from_xattr(&init_user_ns, value, size); in btrfs_get_acl()
50 acl = NULL; in btrfs_get_acl()
52 acl = ERR_PTR(size); in btrfs_get_acl()
55 return acl; in btrfs_get_acl()
60 struct inode *inode, struct posix_acl *acl, int type) in __btrfs_set_acl() argument
72 return acl ? -EINVAL : 0; in __btrfs_set_acl()
79 if (acl) { in __btrfs_set_acl()
82 size = posix_acl_xattr_size(acl->a_count); in __btrfs_set_acl()
95 ret = posix_acl_to_xattr(&init_user_ns, acl, value, size); in __btrfs_set_acl()
[all …]
/Linux-v5.15/fs/orangefs/
Dacl.c15 struct posix_acl *acl; in orangefs_get_acl() local
53 acl = posix_acl_from_xattr(&init_user_ns, value, ret); in orangefs_get_acl()
55 acl = NULL; in orangefs_get_acl()
60 acl = ERR_PTR(ret); in orangefs_get_acl()
64 return acl; in orangefs_get_acl()
67 static int __orangefs_set_acl(struct inode *inode, struct posix_acl *acl, in __orangefs_set_acl() argument
93 if (acl) { in __orangefs_set_acl()
94 size = posix_acl_xattr_size(acl->a_count); in __orangefs_set_acl()
99 error = posix_acl_to_xattr(&init_user_ns, acl, value, size); in __orangefs_set_acl()
106 __func__, name, value, size, acl); in __orangefs_set_acl()
[all …]
/Linux-v5.15/fs/jfs/
Dacl.c19 struct posix_acl *acl; in jfs_get_acl() local
49 acl = NULL; in jfs_get_acl()
51 acl = ERR_PTR(size); in jfs_get_acl()
53 acl = posix_acl_from_xattr(&init_user_ns, value, size); in jfs_get_acl()
56 return acl; in jfs_get_acl()
60 struct posix_acl *acl) in __jfs_set_acl() argument
78 if (acl) { in __jfs_set_acl()
79 size = posix_acl_xattr_size(acl->a_count); in __jfs_set_acl()
83 rc = posix_acl_to_xattr(&init_user_ns, acl, value, size); in __jfs_set_acl()
92 set_cached_acl(inode, type, acl); in __jfs_set_acl()
[all …]
/Linux-v5.15/fs/xfs/
Dxfs_acl.c37 struct posix_acl *acl; in xfs_acl_from_disk() local
54 acl = posix_acl_alloc(count, GFP_KERNEL); in xfs_acl_from_disk()
55 if (!acl) in xfs_acl_from_disk()
59 acl_e = &acl->a_entries[i]; in xfs_acl_from_disk()
89 return acl; in xfs_acl_from_disk()
92 posix_acl_release(acl); in xfs_acl_from_disk()
97 xfs_acl_to_disk(struct xfs_acl *aclp, const struct posix_acl *acl) in xfs_acl_to_disk() argument
103 aclp->acl_cnt = cpu_to_be32(acl->a_count); in xfs_acl_to_disk()
104 for (i = 0; i < acl->a_count; i++) { in xfs_acl_to_disk()
106 acl_e = &acl->a_entries[i]; in xfs_acl_to_disk()
[all …]
/Linux-v5.15/fs/ksmbd/
Dndr.c296 static int ndr_encode_posix_acl_entry(struct ndr *n, struct xattr_smb_acl *acl) in ndr_encode_posix_acl_entry() argument
300 ret = ndr_write_int32(n, acl->count); in ndr_encode_posix_acl_entry()
305 ret = ndr_write_int32(n, acl->count); in ndr_encode_posix_acl_entry()
313 for (i = 0; i < acl->count; i++) { in ndr_encode_posix_acl_entry()
315 ret = ndr_write_int16(n, acl->entries[i].type); in ndr_encode_posix_acl_entry()
319 ret = ndr_write_int16(n, acl->entries[i].type); in ndr_encode_posix_acl_entry()
323 if (acl->entries[i].type == SMB_ACL_USER) { in ndr_encode_posix_acl_entry()
325 ret = ndr_write_int64(n, acl->entries[i].uid); in ndr_encode_posix_acl_entry()
326 } else if (acl->entries[i].type == SMB_ACL_GROUP) { in ndr_encode_posix_acl_entry()
328 ret = ndr_write_int64(n, acl->entries[i].gid); in ndr_encode_posix_acl_entry()
[all …]
/Linux-v5.15/drivers/net/ethernet/mellanox/mlxsw/
Dspectrum_acl.c38 struct mlxsw_afk *mlxsw_sp_acl_afk(struct mlxsw_sp_acl *acl) in mlxsw_sp_acl_afk() argument
40 return acl->afk; in mlxsw_sp_acl_afk()
90 return mlxsw_sp->acl->dummy_fid; in mlxsw_sp_acl_dummy_fid()
165 struct mlxsw_sp_acl *acl = mlxsw_sp->acl; in mlxsw_sp_acl_ruleset_create() local
183 err = ops->ruleset_add(mlxsw_sp, &acl->tcam, ruleset->priv, in mlxsw_sp_acl_ruleset_create()
189 err = rhashtable_insert_fast(&acl->ruleset_ht, &ruleset->ht_node, in mlxsw_sp_acl_ruleset_create()
209 struct mlxsw_sp_acl *acl = mlxsw_sp->acl; in mlxsw_sp_acl_ruleset_destroy() local
211 rhashtable_remove_fast(&acl->ruleset_ht, &ruleset->ht_node, in mlxsw_sp_acl_ruleset_destroy()
232 __mlxsw_sp_acl_ruleset_lookup(struct mlxsw_sp_acl *acl, in __mlxsw_sp_acl_ruleset_lookup() argument
242 return rhashtable_lookup_fast(&acl->ruleset_ht, &ht_key, in __mlxsw_sp_acl_ruleset_lookup()
[all …]
/Linux-v5.15/fs/gfs2/
Dacl.c43 struct posix_acl *acl; in __gfs2_get_acl() local
55 acl = posix_acl_from_xattr(&init_user_ns, data, len); in __gfs2_get_acl()
57 return acl; in __gfs2_get_acl()
65 struct posix_acl *acl; in gfs2_get_acl() local
77 acl = __gfs2_get_acl(inode, type); in gfs2_get_acl()
80 return acl; in gfs2_get_acl()
83 int __gfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type) in __gfs2_set_acl() argument
90 if (acl) { in __gfs2_set_acl()
91 len = posix_acl_xattr_size(acl->a_count); in __gfs2_set_acl()
95 error = posix_acl_to_xattr(&init_user_ns, acl, data, len); in __gfs2_set_acl()
[all …]
/Linux-v5.15/include/linux/
Dposix_acl.h36 #define FOREACH_ACL_ENTRY(pa, acl, pe) \ argument
37 for(pa=(acl)->a_entries, pe=pa+(acl)->a_count; pa<pe; pa++)
44 posix_acl_dup(struct posix_acl *acl) in posix_acl_dup() argument
46 if (acl) in posix_acl_dup()
47 refcount_inc(&acl->a_refcount); in posix_acl_dup()
48 return acl; in posix_acl_dup()
55 posix_acl_release(struct posix_acl *acl) in posix_acl_release() argument
57 if (acl && refcount_dec_and_test(&acl->a_refcount)) in posix_acl_release()
58 kfree_rcu(acl, a_rcu); in posix_acl_release()
89 void set_cached_acl(struct inode *inode, int type, struct posix_acl *acl);
[all …]
/Linux-v5.15/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()
162 static int __nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl, in __nfs3_proc_setacls() argument
171 .acl_access = acl, in __nfs3_proc_setacls()
180 if (acl == NULL && (!S_ISDIR(inode->i_mode) || dfacl == NULL)) in __nfs3_proc_setacls()
190 if (acl != NULL && acl->a_count > NFS_ACL_MAX_ENTRIES) in __nfs3_proc_setacls()
197 args.len = nfsacl_size(acl, dfacl); in __nfs3_proc_setacls()
199 args.len = nfsacl_size(acl, NULL); in __nfs3_proc_setacls()
[all …]
/Linux-v5.15/fs/fuse/
Dacl.c20 struct posix_acl *acl; in fuse_get_acl() local
43 acl = posix_acl_from_xattr(fc->user_ns, value, size); in fuse_get_acl()
46 acl = NULL; in fuse_get_acl()
48 acl = ERR_PTR(-E2BIG); in fuse_get_acl()
50 acl = ERR_PTR(size); in fuse_get_acl()
53 return acl; in fuse_get_acl()
57 struct posix_acl *acl, int type) in fuse_set_acl() argument
76 if (acl) { in fuse_set_acl()
85 size_t size = posix_acl_xattr_size(acl->a_count); in fuse_set_acl()
95 ret = posix_acl_to_xattr(fc->user_ns, acl, value, size); in fuse_set_acl()
/Linux-v5.15/fs/afs/
Dxattr.c24 kfree(op->acl); in afs_acl_put()
43 struct afs_acl *acl = NULL; in afs_xattr_get_acl() local
55 acl = op->acl; in afs_xattr_get_acl()
56 op->acl = NULL; in afs_xattr_get_acl()
60 ret = acl->size; in afs_xattr_get_acl()
62 if (acl->size <= size) in afs_xattr_get_acl()
63 memcpy(buffer, acl->data, acl->size); in afs_xattr_get_acl()
69 kfree(acl); in afs_xattr_get_acl()
76 struct afs_acl *acl; in afs_make_acl() local
78 acl = kmalloc(sizeof(*acl) + size, GFP_KERNEL); in afs_make_acl()
[all …]
/Linux-v5.15/drivers/net/ethernet/mellanox/mlx5/core/esw/acl/
Dhelper.c14 struct mlx5_flow_table *acl; in esw_acl_table_create() local
39 acl = mlx5_create_vport_flow_table(root_ns, &ft_attr, vport_num); in esw_acl_table_create()
40 if (IS_ERR(acl)) { in esw_acl_table_create()
41 err = PTR_ERR(acl); in esw_acl_table_create()
45 return acl; in esw_acl_table_create()
72 mlx5_add_flow_rules(vport->egress.acl, spec, in esw_egress_acl_vlan_create()
115 vlan_grp = mlx5_create_flow_group(vport->egress.acl, flow_group_in); in esw_acl_egress_vlan_grp_create()
140 if (IS_ERR_OR_NULL(vport->egress.acl)) in esw_acl_egress_table_destroy()
143 mlx5_destroy_flow_table(vport->egress.acl); in esw_acl_egress_table_destroy()
144 vport->egress.acl = NULL; in esw_acl_egress_table_destroy()
[all …]
/Linux-v5.15/security/tomoyo/
Dgc.c51 head->r.acl == element || &head->w.domain->list == element) in tomoyo_struct_used_by_io_buffer()
158 struct tomoyo_acl_info *acl = in tomoyo_del_acl() local
159 container_of(element, typeof(*acl), list); in tomoyo_del_acl()
161 tomoyo_put_condition(acl->cond); in tomoyo_del_acl()
162 switch (acl->type) { in tomoyo_del_acl()
166 = container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
173 = container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
181 = container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
189 = container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
199 = container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
[all …]

123456