smb_acl
static __u16 replace_sids_and_copy_aces(struct smb_acl *pdacl, struct smb_acl *pndacl,
size = sizeof(struct smb_acl);
nsize = sizeof(struct smb_acl);
static int set_chmod_dacl(struct smb_acl *pdacl, struct smb_acl *pndacl,
nsize = sizeof(struct smb_acl);
size = sizeof(struct smb_acl);
struct smb_acl *dacl_ptr; /* no need for SACL ptr */
dacl_ptr = (struct smb_acl *)((char *)pntsd + dacloffset);
struct smb_acl *dacl_ptr = NULL; /* no need for SACL ptr */
struct smb_acl *ndacl_ptr = NULL; /* no need for SACL ptr */
dacl_ptr = (struct smb_acl *)((char *)pntsd + dacloffset);
ndacl_ptr = (struct smb_acl *)((char *)pnntsd + ndacloffset);
ndacl_ptr = (struct smb_acl *)((char *)pnntsd + ndacloffset);
struct smb_acl *dacl_ptr = NULL;
dacl_ptr = (struct smb_acl *)((char *)pntsd + dacloffset);
static void parse_dacl(struct smb_acl *pdacl, char *end_of_acl,
if (end_of_acl < (char *)pdacl + sizeof(struct smb_acl) ||
acl_size = sizeof(struct smb_acl);
if (num_aces > (le16_to_cpu(pdacl->size) - sizeof(struct smb_acl)) /
sizeof(struct smb_acl) + \
dacl_ptr = (struct smb_acl *)((char *)pntsd + offset);
dacl_ptr->size = cpu_to_le16(sizeof(struct smb_acl));
struct smb_acl *ppdacl_ptr;
(dacl_offset + sizeof(struct smb_acl) > ppntsd_size))
ppdacl_ptr = (struct smb_acl *)((char *)ppntsd + dacl_offset);
ppdacl_size < sizeof(struct smb_acl))
ntacl_size - sizeof(struct smb_acl),
struct smb_acl *parent_pdacl;
check_add_overflow(dacloffset, sizeof(struct smb_acl), &dacl_struct_end) ||
parent_pdacl = (struct smb_acl *)((char *)parent_pntsd + dacloffset);
if (pdacl_size > acl_len || pdacl_size < sizeof(struct smb_acl)) {
sizeof(struct smb_acl));
aces_size = acl_len - sizeof(struct smb_acl);
struct smb_acl *pdacl;
pgroup_sid_size + sizeof(struct smb_acl) + nt_size;
if ((u64)le32_to_cpu(pntsd->dacloffset) + sizeof(struct smb_acl) + nt_size >
pdacl = (struct smb_acl *)((char *)pntsd + le32_to_cpu(pntsd->dacloffset));
pdacl->size = cpu_to_le16(sizeof(struct smb_acl) + nt_size);
pace = (struct smb_ace *)((char *)pdacl + sizeof(struct smb_acl));
pntsd_size += sizeof(struct smb_acl) + nt_size;
struct smb_acl *pdacl;
check_add_overflow(dacl_offset, sizeof(struct smb_acl), &dacl_struct_end) ||
pdacl = (struct smb_acl *)((char *)pntsd + le32_to_cpu(pntsd->dacloffset));
if (pdacl_size > acl_size || pdacl_size < sizeof(struct smb_acl))
if (!(pdacl_size - sizeof(struct smb_acl)) &&
ace = (struct smb_ace *)((char *)pdacl + sizeof(struct smb_acl));
aces_size = acl_size - sizeof(struct smb_acl);
ace = (struct smb_ace *)((char *)pdacl + sizeof(struct smb_acl));
aces_size = acl_size - sizeof(struct smb_acl);
struct smb_acl *pdacl, char *end_of_acl,
if (end_of_acl < (char *)pdacl + sizeof(struct smb_acl) ||
acl_size = sizeof(struct smb_acl);
if (num_aces > (le16_to_cpu(pdacl->size) - sizeof(struct smb_acl)) /
struct smb_acl *pndacl,
struct smb_acl *nt_dacl,
pndace = (struct smb_ace *)((char *)pndacl + sizeof(struct smb_acl));
ntace = (struct smb_ace *)((char *)nt_dacl + sizeof(struct smb_acl));
struct smb_acl *pndacl, struct smb_fattr *fattr)
pace = pndace = (struct smb_ace *)((char *)pndacl + sizeof(struct smb_acl));
struct smb_acl *dacl_ptr; /* no need for SACL ptr */
dacl_ptr = (struct smb_acl *)((char *)pntsd + dacloffset);
len += sizeof(struct smb_acl);
struct smb_acl *dacl_ptr = NULL; /* no need for SACL ptr */
struct xattr_smb_acl *smb_acl = NULL;
smb_acl = kzalloc(sizeof(struct xattr_smb_acl) +
if (!smb_acl)
smb_acl->count = posix_acls->a_count;
xa_entry = smb_acl->entries;
return smb_acl;
struct xattr_smb_acl *smb_acl, *def_smb_acl = NULL;
smb_acl = ksmbd_vfs_make_xattr_posix_acl(idmap, inode,
smb_acl, def_smb_acl);
kfree(smb_acl);
struct xattr_smb_acl *smb_acl = NULL, *def_smb_acl = NULL;
smb_acl = ksmbd_vfs_make_xattr_posix_acl(idmap, inode,
rc = ndr_encode_posix_acl(&acl_ndr, idmap, inode, smb_acl,
kfree(smb_acl);