smb_sid
struct smb_sid *pownersid, struct smb_sid *pgrpsid,
struct smb_sid *pnownersid, struct smb_sid *pngrpsid)
sid_to_key_str(struct smb_sid *sidptr, unsigned int type)
struct smb_sid *pownersid, struct smb_sid *pgrpsid,
static int parse_sid(struct smb_sid *psid, char *end_of_acl)
struct smb_sid *owner_sid_ptr, *group_sid_ptr;
owner_sid_ptr = (struct smb_sid *)((char *)pntsd +
group_sid_ptr = (struct smb_sid *)((char *)pntsd +
struct smb_sid *owner_sid_ptr, *group_sid_ptr;
struct smb_sid *nowner_sid_ptr = NULL, *ngroup_sid_ptr = NULL;
owner_sid_ptr = (struct smb_sid *)((char *)pntsd +
group_sid_ptr = (struct smb_sid *)((char *)pntsd +
nowner_sid_ptr = kzalloc_obj(struct smb_sid);
ngroup_sid_ptr = kzalloc_obj(struct smb_sid);
compare_sids(const struct smb_sid *ctsid, const struct smb_sid *cwsid)
nsecdesclen = sizeof(struct smb_ntsd) + (sizeof(struct smb_sid) * 2);
is_well_known_sid(const struct smb_sid *psid, uint32_t *puid, bool is_group)
const struct smb_sid *pwell_known_sid;
cifs_copy_sid(struct smb_sid *dst, const struct smb_sid *src)
id_to_sid(unsigned int cid, uint sidtype, struct smb_sid *ssid)
struct smb_sid *ksid;
static const struct smb_sid sid_everyone = {
(struct smb_sid *)&sidkey->payload :
(struct smb_sid *)sidkey->payload.data[0];
static const struct smb_sid sid_authusers = {
sid_to_id(struct cifs_sb_info *cifs_sb, struct smb_sid *psid,
static const struct smb_sid sid_unix_users = {1, 1, {0, 0, 0, 0, 0, 22},
static const struct smb_sid sid_unix_groups = { 1, 1, {0, 0, 0, 0, 0, 22},
static const struct smb_sid sid_unix_NFS_users = { 1, 2, {0, 0, 0, 0, 0, 5},
struct smb_sid *pownersid,
struct smb_sid *pgrpsid)
struct smb_sid *owner_sid_ptr, *group_sid_ptr;
struct smb_sid *nowner_sid_ptr, *ngroup_sid_ptr;
pnntsd->gsidoffset = cpu_to_le32(sidsoffset + sizeof(struct smb_sid));
owner_sid_ptr = (struct smb_sid *)((char *)pntsd +
nowner_sid_ptr = (struct smb_sid *)((char *)pnntsd + sidsoffset);
group_sid_ptr = (struct smb_sid *)((char *)pntsd +
static const struct smb_sid sid_unix_NFS_groups = { 1, 2, {0, 0, 0, 0, 0, 5},
ngroup_sid_ptr = (struct smb_sid *)((char *)pnntsd + sidsoffset +
sizeof(struct smb_sid));
return sidsoffset + (2 * sizeof(struct smb_sid));
static const struct smb_sid sid_unix_NFS_mode = { 1, 2, {0, 0, 0, 0, 0, 5},
static __u16 cifs_copy_ace(struct smb_ace *dst, struct smb_ace *src, struct smb_sid *psid)
const struct smb_sid *psid, __u64 nmode,
struct smb_sid *pownersid, struct smb_sid *pgrpsid,
offsetof(struct smb_sid, sub_auth) + sizeof(__le16)))
offsetof(struct smb_sid, sub_auth);
struct smb_sid *pownersid,
struct smb_sid *pgrpsid,
if (!memcmp(pownersid, pgrpsid, sizeof(struct smb_sid))) {
struct smb_sid osid;
struct smb_sid gsid;
struct smb_sid posix_owner;
struct smb_sid posix_group;
int sid_to_id(struct cifs_sb_info *cifs_sb, struct smb_sid *psid,
(sizeof(struct smb_sid) * 2), 0, NULL);
(sizeof(struct smb_sid) * 2), 0, NULL);
struct smb_sid owner; /* var-sized on the wire */
struct smb_sid group; /* var-sized on the wire */
struct smb_sid owner;
struct smb_sid group;
struct smb_sid sid; /* ie UUID of user or group who gets these perms */
SIDOWNER, (struct smb_sid *)&buf->SidBuffer[0]);
SIDUNIX_GROUP, (struct smb_sid *)&buf->SidBuffer[28]);
struct smb_sid domain_sid;
SIDUNIX_USER, (struct smb_sid *)&posix_info->SidBuffer[0]);
SIDUNIX_GROUP, (struct smb_sid *)&posix_info->SidBuffer[16]);
SIDUNIX_USER, (struct smb_sid *)&file_info->Sids[0]);
SIDUNIX_GROUP, (struct smb_sid *)&file_info->Sids[16]);
owner_sid_ptr = (struct smb_sid *)((char *)pntsd + offset);
group_sid_ptr = (struct smb_sid *)((char *)pntsd + offset);
static void smb_set_ace(struct smb_ace *ace, const struct smb_sid *sid, u8 type,
const struct smb_sid *psid, *creator = NULL;
struct smb_sid owner_sid, group_sid;
static void smb_copy_sid(struct smb_sid *dst, const struct smb_sid *src)
struct smb_sid *powner_sid = NULL, *pgroup_sid = NULL;
powner_sid = (struct smb_sid *)((char *)parent_pntsd +
pgroup_sid = (struct smb_sid *)((char *)parent_pntsd +
struct smb_sid *owner_sid = (struct smb_sid *)((char *)pntsd +
struct smb_sid *group_sid = (struct smb_sid *)((char *)pntsd +
struct smb_sid sid;
memcpy(&server_conf.domain_sid, &domain, sizeof(struct smb_sid));
const struct smb_sid *psid, int type, int flags,
static const struct smb_sid domain = {1, 4, {0, 0, 0, 0, 0, 5},
void id_to_sid(unsigned int cid, uint sidtype, struct smb_sid *ssid)
static const struct smb_sid creator_owner = {
struct smb_sid *psid, uint sidtype,
static const struct smb_sid creator_group = {
static const struct smb_sid sid_everyone = {
static const struct smb_sid sid_authusers = {
struct smb_sid *pownersid, struct smb_sid *pgrpsid,
static const struct smb_sid sid_unix_users = {1, 1, {0, 0, 0, 0, 0, 22},
offsetof(struct smb_sid, sub_auth) + sizeof(__le16)))
static const struct smb_sid sid_unix_groups = { 1, 1, {0, 0, 0, 0, 0, 22},
offsetof(struct smb_sid, sub_auth);
static const struct smb_sid sid_unix_NFS_users = { 1, 2, {0, 0, 0, 0, 0, 5},
static const struct smb_sid sid_unix_NFS_groups = { 1, 2, {0, 0, 0, 0, 0, 5},
struct smb_sid *sid;
sid = kmalloc_obj(struct smb_sid, KSMBD_DEFAULT_GFP);
static const struct smb_sid sid_unix_NFS_mode = { 1, 2, {0, 0, 0, 0, 0, 5},
sid = kmalloc_obj(struct smb_sid, KSMBD_DEFAULT_GFP);
const struct smb_sid *pownersid,
const struct smb_sid *pgrpsid,
int compare_sids(const struct smb_sid *ctsid, const struct smb_sid *cwsid)
const struct smb_sid *sid;
static int parse_sid(struct smb_sid *psid, char *end_of_acl)
struct smb_sid *owner_sid_ptr, *group_sid_ptr;
owner_sid_ptr = (struct smb_sid *)((char *)pntsd +
group_sid_ptr = (struct smb_sid *)((char *)pntsd +
len += sizeof(struct smb_sid);
len += sizeof(struct smb_sid);
struct smb_sid *owner_sid_ptr, *group_sid_ptr;
struct smb_sid *nowner_sid_ptr, *ngroup_sid_ptr;
nowner_sid_ptr = kmalloc_obj(struct smb_sid, KSMBD_DEFAULT_GFP);
ngroup_sid_ptr = kmalloc_obj(struct smb_sid, KSMBD_DEFAULT_GFP);
void id_to_sid(unsigned int cid, uint sidtype, struct smb_sid *ssid);
int compare_sids(const struct smb_sid *ctsid, const struct smb_sid *cwsid);