/openbmc/linux/fs/9p/ |
H A D | acl.c | 15 #include "acl.h" 24 struct posix_acl *acl = NULL; in v9fs_fid_get_acl() local 38 acl = ERR_PTR(size); in v9fs_fid_get_acl() 40 acl = ERR_PTR(-ENODATA); in v9fs_fid_get_acl() 42 acl = posix_acl_from_xattr(&init_user_ns, value, size); in v9fs_fid_get_acl() 44 return acl; in v9fs_fid_get_acl() 50 struct posix_acl *acl = NULL; in v9fs_acl_get() local 56 acl = v9fs_fid_get_acl(fid, name); in v9fs_acl_get() 58 return acl; in v9fs_acl_get() 64 struct posix_acl *acl = NULL; in __v9fs_get_acl() local [all …]
|
/openbmc/linux/fs/nfs_common/ |
H A D | nfsacl.c | 20 * - ACL entries in the kernel are kept sorted in ascending order 37 struct posix_acl *acl; member 44 struct posix_acl acl; member 56 &nfsacl_desc->acl->a_entries[nfsacl_desc->count++]; in xdr_nfsace_encode() 81 * nfsacl_encode - Encode an NFSv3 ACL 83 * @buf: destination xdr_buf to contain XDR encoded ACL 84 * @base: byte offset in xdr_buf where XDR'd ACL begins 85 * @inode: inode of file whose ACL this is 86 * @acl: posix_acl to encode 88 * @typeflag: ACL type: NFS_ACL_DEFAULT or zero [all …]
|
/openbmc/linux/drivers/target/ |
H A D | target_core_tpg.c | 44 struct se_node_acl *acl; in __core_tpg_get_initiator_node_acl() local 46 list_for_each_entry(acl, &tpg->acl_node_list, acl_list) { in __core_tpg_get_initiator_node_acl() 47 if (!strcmp(acl->initiatorname, initiatorname)) in __core_tpg_get_initiator_node_acl() 48 return acl; in __core_tpg_get_initiator_node_acl() 62 struct se_node_acl *acl; in core_tpg_get_initiator_node_acl() local 65 * initiatorname[] during node acl endpoint lookup driven by in core_tpg_get_initiator_node_acl() 73 acl = __core_tpg_get_initiator_node_acl(tpg, initiatorname); in core_tpg_get_initiator_node_acl() 74 if (acl) { in core_tpg_get_initiator_node_acl() 75 if (!kref_get_unless_zero(&acl->acl_kref)) in core_tpg_get_initiator_node_acl() 76 acl = NULL; in core_tpg_get_initiator_node_acl() [all …]
|
/openbmc/linux/fs/ |
H A D | posix_acl.c | 50 struct posix_acl *acl; in get_cached_acl() local 54 acl = rcu_dereference(*p); in get_cached_acl() 55 if (!acl || is_uncached_acl(acl) || in get_cached_acl() 56 refcount_inc_not_zero(&acl->a_refcount)) in get_cached_acl() 62 return acl; in get_cached_acl() 68 struct posix_acl *acl = rcu_dereference(*acl_by_type(inode, type)); in get_cached_acl_rcu() local 70 if (acl == ACL_DONT_CACHE) { in get_cached_acl_rcu() 75 acl = ret; in get_cached_acl_rcu() 78 return acl; in get_cached_acl_rcu() 82 void set_cached_acl(struct inode *inode, int type, struct posix_acl *acl) in set_cached_acl() argument [all …]
|
/openbmc/linux/fs/ocfs2/ |
H A D | acl.c | 3 * acl.c 8 * Lots of code in this file is copy from linux/fs/ext3/acl.c. 28 #include "acl.h" 31 * Convert from xattr value to acl struct. 36 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() [all …]
|
/openbmc/linux/fs/reiserfs/ |
H A D | xattr_acl.c | 12 #include "acl.h" 17 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() 44 if (type == ACL_TYPE_ACCESS && acl) { in reiserfs_set_acl() 46 &mode, &acl); in reiserfs_set_acl() 51 error = __reiserfs_set_acl(&th, inode, type, acl); in reiserfs_set_acl() 72 struct posix_acl *acl; in reiserfs_posix_acl_from_disk() local 87 acl = posix_acl_alloc(count, GFP_NOFS); in reiserfs_posix_acl_from_disk() 88 if (!acl) in reiserfs_posix_acl_from_disk() [all …]
|
/openbmc/linux/fs/f2fs/ |
H A D | acl.c | 3 * fs/f2fs/acl.c 8 * Portions of this code from linux/fs/ext2/acl.c 15 #include "acl.h" 49 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() [all …]
|
/openbmc/linux/fs/ceph/ |
H A D | acl.c | 3 * linux/fs/ceph/acl.c 20 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() 75 pr_err_ratelimited("get acl %llx.%llx failed, err=%d\n", 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() [all …]
|
/openbmc/linux/fs/ext4/ |
H A D | acl.c | 3 * linux/fs/ext4/acl.c 12 #include "acl.h" 22 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() [all …]
|
/openbmc/linux/fs/ext2/ |
H A D | acl.c | 3 * linux/fs/ext2/acl.c 14 #include "acl.h" 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() 62 acl->a_entries[n].e_uid = in ext2_acl_from_disk() 70 acl->a_entries[n].e_gid = in ext2_acl_from_disk() [all …]
|
/openbmc/linux/fs/jffs2/ |
H A D | acl.c | 60 struct posix_acl *acl; in jffs2_acl_from_medium() local 70 JFFS2_WARNING("Invalid ACL version. (=%u)\n", ver); in jffs2_acl_from_medium() 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() [all …]
|
/openbmc/linux/drivers/net/ethernet/marvell/prestera/ |
H A D | prestera_acl.c | 53 struct rhash_head ht_node; /* Member of acl HT */ 56 struct prestera_acl *acl; member 136 prestera_acl_ruleset_create(struct prestera_acl *acl, in prestera_acl_ruleset_create() argument 151 ruleset->acl = acl; in prestera_acl_ruleset_create() 161 err = idr_alloc_u32(&acl->uid, NULL, &uid, U8_MAX, GFP_KERNEL); in prestera_acl_ruleset_create() 172 err = rhashtable_insert_fast(&acl->ruleset_ht, &ruleset->ht_node, in prestera_acl_ruleset_create() 180 idr_remove(&acl->uid, uid); in prestera_acl_ruleset_create() 211 err = prestera_acl_vtcam_id_get(ruleset->acl, in prestera_acl_ruleset_offload() 224 err = prestera_hw_vtcam_iface_bind(ruleset->acl->sw, &iface, in prestera_acl_ruleset_offload() 235 prestera_acl_vtcam_id_put(ruleset->acl, ruleset->vtcam_id); in prestera_acl_ruleset_offload() [all …]
|
/openbmc/linux/fs/xfs/ |
H A D | xfs_acl.c | 26 * - all ACL updates are protected by inode->i_mutex, which is taken before 38 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() 90 return acl; in xfs_acl_from_disk() 93 posix_acl_release(acl); in xfs_acl_from_disk() 98 xfs_acl_to_disk(struct xfs_acl *aclp, const struct posix_acl *acl) in xfs_acl_to_disk() argument 104 aclp->acl_cnt = cpu_to_be32(acl->a_count); in xfs_acl_to_disk() 105 for (i = 0; i < acl->a_count; i++) { in xfs_acl_to_disk() [all …]
|
/openbmc/linux/fs/smb/server/ |
H A D | ndr.c | 296 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 …]
|
/openbmc/linux/fs/jfs/ |
H A D | acl.c | 19 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 …]
|
/openbmc/linux/drivers/target/iscsi/ |
H A D | iscsi_target_nodeattrib.c | 28 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() 45 struct iscsi_node_acl *acl, in iscsit_na_dataout_timeout() argument 48 struct iscsi_node_attrib *a = &acl->node_attrib; in iscsit_na_dataout_timeout() 64 " %s\n", a->dataout_timeout, iscsit_na_get_initiatorname(acl)); in iscsit_na_dataout_timeout() 70 struct iscsi_node_acl *acl, in iscsit_na_dataout_timeout_retries() argument 73 struct iscsi_node_attrib *a = &acl->node_attrib; in iscsit_na_dataout_timeout_retries() 90 iscsit_na_get_initiatorname(acl)); in iscsit_na_dataout_timeout_retries() 96 struct iscsi_node_acl *acl, in iscsit_na_nopin_timeout() argument 99 struct iscsi_node_attrib *a = &acl->node_attrib; in iscsit_na_nopin_timeout() [all …]
|
/openbmc/linux/drivers/net/ethernet/mellanox/mlxsw/ |
H A D | spectrum_acl.c | 39 struct mlxsw_afk *mlxsw_sp_acl_afk(struct mlxsw_sp_acl *acl) in mlxsw_sp_acl_afk() argument 41 return acl->afk; in mlxsw_sp_acl_afk() 44 struct mlxsw_sp_acl_tcam *mlxsw_sp_acl_to_tcam(struct mlxsw_sp_acl *acl) in mlxsw_sp_acl_to_tcam() argument 46 return &acl->tcam; in mlxsw_sp_acl_to_tcam() 56 struct rhash_head ht_node; /* Member of acl HT */ 96 return mlxsw_sp->acl->dummy_fid; in mlxsw_sp_acl_dummy_fid() 171 struct mlxsw_sp_acl *acl = mlxsw_sp->acl; in mlxsw_sp_acl_ruleset_create() local 189 err = ops->ruleset_add(mlxsw_sp, &acl->tcam, ruleset->priv, in mlxsw_sp_acl_ruleset_create() 195 err = rhashtable_insert_fast(&acl->ruleset_ht, &ruleset->ht_node, in mlxsw_sp_acl_ruleset_create() 215 struct mlxsw_sp_acl *acl = mlxsw_sp->acl; in mlxsw_sp_acl_ruleset_destroy() local [all …]
|
/openbmc/linux/fs/orangefs/ |
H A D | acl.c | 15 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() 57 gossip_err("inode %pU retrieving acl's failed with error %d\n", in orangefs_get_acl() 60 acl = ERR_PTR(ret); in orangefs_get_acl() 64 return acl; in orangefs_get_acl() 67 int __orangefs_set_acl(struct inode *inode, struct posix_acl *acl, int type) in __orangefs_set_acl() argument 92 if (acl) { in __orangefs_set_acl() 93 size = posix_acl_xattr_size(acl->a_count); in __orangefs_set_acl() 98 error = posix_acl_to_xattr(&init_user_ns, acl, value, size); in __orangefs_set_acl() [all …]
|
/openbmc/linux/fs/gfs2/ |
H A D | acl.c | 19 #include "acl.h" 43 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() [all …]
|
/openbmc/linux/fs/nfs/ |
H A D | nfs3acl.c | 24 /* If the ACL isn't being read yet, set our sentinel. */ in nfs3_prepare_get_acl() 28 static void nfs3_complete_get_acl(struct posix_acl **p, struct posix_acl *acl) in nfs3_complete_get_acl() argument 32 /* Only cache the ACL if our sentinel is still in place. */ in nfs3_complete_get_acl() 33 posix_acl_dup(acl); in nfs3_complete_get_acl() 34 if (cmpxchg(p, sentinel, acl) != sentinel) in nfs3_complete_get_acl() 35 posix_acl_release(acl); in nfs3_complete_get_acl() 75 * Only get the access acl when explicitly requested: We don't in nfs3_get_acl() 77 * it. Applications which request the access acl first are not in nfs3_get_acl() 161 static int __nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl, in __nfs3_proc_setacls() argument 170 .acl_access = acl, in __nfs3_proc_setacls() [all …]
|
/openbmc/linux/fs/btrfs/ |
H A D | acl.c | 17 #include "acl.h" 24 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() 59 struct posix_acl *acl, int type) in __btrfs_set_acl() argument 71 return acl ? -EINVAL : 0; in __btrfs_set_acl() 78 if (acl) { in __btrfs_set_acl() 81 size = posix_acl_xattr_size(acl->a_count); in __btrfs_set_acl() [all …]
|
/openbmc/linux/include/linux/ |
H A D | posix_acl.h | 36 #define FOREACH_ACL_ENTRY(pa, acl, pe) \ argument 37 for(pa=(acl)->a_entries, pe=pa+(acl)->a_count; pa<pe; pa++) 41 * Duplicate an ACL handle. 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() 52 * Free an ACL handle. 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() [all …]
|
/openbmc/linux/fs/afs/ |
H A D | xattr.c | 15 * Deal with the result of a successful fetch ACL operation. 24 kfree(op->acl); in afs_acl_put() 34 * Get a file's ACL. 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() [all …]
|
/openbmc/openbmc/poky/bitbake/lib/bb/ |
H A D | acl.py | 46 def acl_free(acl): argument 47 libacl.acl_free(acl) 55 acl = libacl.acl_get_file(os.fsencode(path), typ) 56 if acl is None: 60 return acl 66 def acl_get_entry(acl, entry_id): argument 68 ret = libacl.acl_get_entry(acl, entry_id, ctypes.byref(entry)) 158 class ACL(object): class 159 def __init__(self, acl): argument 160 self.acl = acl [all …]
|
/openbmc/qemu/tests/tcg/mips/user/ase/dsp/ |
H A D | test_dsp_r1_dpaq_sa_l_w.c | 7 int ach = 0, acl = 0; in main() local 22 : "+r"(ach), "+r"(acl), "=r"(dsp) in main() 28 assert(acl == resultl); in main() 31 acl = 0x00000048; in main() 45 : "+r"(ach), "+r"(acl), "=r"(dsp) in main() 51 assert(acl == resultl); in main() 54 acl = 0xFCEABB08; in main() 68 : "+r"(ach), "+r"(acl), "=r"(dsp) in main() 74 assert(acl == resultl); in main() 77 acl = 0; in main() [all …]
|