Lines Matching refs:sid

208 	pntace->sid.revision = psid->revision;  in fill_ace_for_sid()
209 pntace->sid.num_subauth = psid->num_subauth; in fill_ace_for_sid()
211 pntace->sid.authority[i] = psid->authority[i]; in fill_ace_for_sid()
213 pntace->sid.sub_auth[i] = psid->sub_auth[i]; in fill_ace_for_sid()
431 acl_size = offsetof(struct smb_ace, sid) + in parse_dacl()
435 ppace[i]->sid.num_subauth > SID_MAX_SUB_AUTHORITIES || in parse_dacl()
437 acl_size + sizeof(__le32) * ppace[i]->sid.num_subauth) || in parse_dacl()
439 acl_size + sizeof(__le32) * ppace[i]->sid.num_subauth)) in parse_dacl()
446 if (!(compare_sids(&ppace[i]->sid, &sid_unix_NFS_mode))) { in parse_dacl()
448 le32_to_cpu(ppace[i]->sid.sub_auth[2]); in parse_dacl()
450 } else if (!compare_sids(&ppace[i]->sid, pownersid)) { in parse_dacl()
461 } else if (!compare_sids(&ppace[i]->sid, pgrpsid) || in parse_dacl()
462 ppace[i]->sid.sub_auth[ppace[i]->sid.num_subauth - 1] == in parse_dacl()
473 } else if (!compare_sids(&ppace[i]->sid, &sid_everyone)) { in parse_dacl()
483 } else if (!compare_sids(&ppace[i]->sid, &creator_owner)) { in parse_dacl()
485 } else if (!compare_sids(&ppace[i]->sid, &creator_group)) { in parse_dacl()
487 } else if (!compare_sids(&ppace[i]->sid, &sid_authusers)) { in parse_dacl()
495 ret = sid_to_id(idmap, &ppace[i]->sid, SIDOWNER, &temp_fattr); in parse_dacl()
587 struct smb_sid *sid; in set_posix_acl_entries_dacl() local
598 sid = kmalloc(sizeof(struct smb_sid), GFP_KERNEL); in set_posix_acl_entries_dacl()
599 if (!sid) in set_posix_acl_entries_dacl()
609 id_to_sid(uid, sid_type, sid); in set_posix_acl_entries_dacl()
614 id_to_sid(gid, SIDUNIX_GROUP, sid); in set_posix_acl_entries_dacl()
616 smb_copy_sid(sid, &sid_everyone); in set_posix_acl_entries_dacl()
618 kfree(sid); in set_posix_acl_entries_dacl()
623 if (ntace->sid.sub_auth[ntace->sid.num_subauth - 1] == in set_posix_acl_entries_dacl()
624 sid->sub_auth[sid->num_subauth - 1]) in set_posix_acl_entries_dacl()
634 *size += fill_ace_for_sid(ntace, sid, ACCESS_ALLOWED, flags, in set_posix_acl_entries_dacl()
644 *size += fill_ace_for_sid(ntace, sid, ACCESS_ALLOWED, in set_posix_acl_entries_dacl()
653 kfree(sid); in set_posix_acl_entries_dacl()
665 sid = kmalloc(sizeof(struct smb_sid), GFP_KERNEL); in set_posix_acl_entries_dacl()
666 if (!sid) in set_posix_acl_entries_dacl()
673 id_to_sid(uid, SIDCREATOR_OWNER, sid); in set_posix_acl_entries_dacl()
678 id_to_sid(gid, SIDCREATOR_GROUP, sid); in set_posix_acl_entries_dacl()
680 kfree(sid); in set_posix_acl_entries_dacl()
685 *size += fill_ace_for_sid(ntace, sid, ACCESS_ALLOWED, 0x0b, in set_posix_acl_entries_dacl()
691 kfree(sid); in set_posix_acl_entries_dacl()
742 const struct smb_sid *sid; in set_mode_dacl() local
755 sid = &server_conf.domain_sid; in set_mode_dacl()
757 sid = &sid_unix_users; in set_mode_dacl()
758 ace_size = fill_ace_for_sid(pace, sid, ACCESS_ALLOWED, 0, in set_mode_dacl()
760 pace->sid.sub_auth[pace->sid.num_subauth++] = cpu_to_le32(uid); in set_mode_dacl()
768 pace->sid.sub_auth[pace->sid.num_subauth++] = in set_mode_dacl()
988 static void smb_set_ace(struct smb_ace *ace, const struct smb_sid *sid, u8 type, in smb_set_ace() argument
994 smb_copy_sid(&ace->sid, sid); in smb_set_ace()
995 ace->size = cpu_to_le16(1 + 1 + 2 + 4 + 1 + 1 + 6 + (sid->num_subauth * 4)); in smb_set_ace()
1074 if (!compare_sids(&creator_owner, &parent_aces->sid)) { in smb_inherit_dacl()
1078 } else if (!compare_sids(&creator_group, &parent_aces->sid)) { in smb_inherit_dacl()
1084 psid = &parent_aces->sid; in smb_inherit_dacl()
1096 psid = &parent_aces->sid; in smb_inherit_dacl()
1223 struct smb_sid sid; in smb_check_perm_dacl() local
1283 id_to_sid(uid, sid_type, &sid); in smb_check_perm_dacl()
1295 if (!compare_sids(&sid, &ace->sid) || in smb_check_perm_dacl()
1296 !compare_sids(&sid_unix_NFS_mode, &ace->sid)) { in smb_check_perm_dacl()
1300 if (!compare_sids(&sid_everyone, &ace->sid)) in smb_check_perm_dacl()