Lines Matching refs:sid

207 	pntace->sid.revision = psid->revision;  in fill_ace_for_sid()
208 pntace->sid.num_subauth = psid->num_subauth; in fill_ace_for_sid()
210 pntace->sid.authority[i] = psid->authority[i]; in fill_ace_for_sid()
212 pntace->sid.sub_auth[i] = psid->sub_auth[i]; in fill_ace_for_sid()
439 acl_size = offsetof(struct smb_ace, sid) + in parse_dacl()
443 ppace[i]->sid.num_subauth > SID_MAX_SUB_AUTHORITIES || in parse_dacl()
445 acl_size + sizeof(__le32) * ppace[i]->sid.num_subauth) || in parse_dacl()
447 acl_size + sizeof(__le32) * ppace[i]->sid.num_subauth)) in parse_dacl()
454 if (!(compare_sids(&ppace[i]->sid, &sid_unix_NFS_mode))) { in parse_dacl()
456 le32_to_cpu(ppace[i]->sid.sub_auth[2]); in parse_dacl()
458 } else if (!compare_sids(&ppace[i]->sid, pownersid)) { in parse_dacl()
469 } else if (!compare_sids(&ppace[i]->sid, pgrpsid) || in parse_dacl()
470 ppace[i]->sid.sub_auth[ppace[i]->sid.num_subauth - 1] == in parse_dacl()
481 } else if (!compare_sids(&ppace[i]->sid, &sid_everyone)) { in parse_dacl()
491 } else if (!compare_sids(&ppace[i]->sid, &creator_owner)) { in parse_dacl()
493 } else if (!compare_sids(&ppace[i]->sid, &creator_group)) { in parse_dacl()
495 } else if (!compare_sids(&ppace[i]->sid, &sid_authusers)) { in parse_dacl()
503 ret = sid_to_id(user_ns, &ppace[i]->sid, SIDOWNER, &temp_fattr); in parse_dacl()
595 struct smb_sid *sid; in set_posix_acl_entries_dacl() local
606 sid = kmalloc(sizeof(struct smb_sid), GFP_KERNEL); in set_posix_acl_entries_dacl()
607 if (!sid) in set_posix_acl_entries_dacl()
617 id_to_sid(uid, sid_type, sid); in set_posix_acl_entries_dacl()
622 id_to_sid(gid, SIDUNIX_GROUP, sid); in set_posix_acl_entries_dacl()
624 smb_copy_sid(sid, &sid_everyone); in set_posix_acl_entries_dacl()
626 kfree(sid); in set_posix_acl_entries_dacl()
631 if (ntace->sid.sub_auth[ntace->sid.num_subauth - 1] == in set_posix_acl_entries_dacl()
632 sid->sub_auth[sid->num_subauth - 1]) in set_posix_acl_entries_dacl()
642 *size += fill_ace_for_sid(ntace, sid, ACCESS_ALLOWED, flags, in set_posix_acl_entries_dacl()
652 *size += fill_ace_for_sid(ntace, sid, ACCESS_ALLOWED, in set_posix_acl_entries_dacl()
661 kfree(sid); in set_posix_acl_entries_dacl()
673 sid = kmalloc(sizeof(struct smb_sid), GFP_KERNEL); in set_posix_acl_entries_dacl()
674 if (!sid) in set_posix_acl_entries_dacl()
681 id_to_sid(uid, SIDCREATOR_OWNER, sid); in set_posix_acl_entries_dacl()
686 id_to_sid(gid, SIDCREATOR_GROUP, sid); in set_posix_acl_entries_dacl()
688 kfree(sid); in set_posix_acl_entries_dacl()
693 *size += fill_ace_for_sid(ntace, sid, ACCESS_ALLOWED, 0x0b, in set_posix_acl_entries_dacl()
699 kfree(sid); in set_posix_acl_entries_dacl()
739 const struct smb_sid *sid; in set_mode_dacl() local
752 sid = &server_conf.domain_sid; in set_mode_dacl()
754 sid = &sid_unix_users; in set_mode_dacl()
755 ace_size = fill_ace_for_sid(pace, sid, ACCESS_ALLOWED, 0, in set_mode_dacl()
757 pace->sid.sub_auth[pace->sid.num_subauth++] = cpu_to_le32(uid); in set_mode_dacl()
765 pace->sid.sub_auth[pace->sid.num_subauth++] = in set_mode_dacl()
975 static void smb_set_ace(struct smb_ace *ace, const struct smb_sid *sid, u8 type, in smb_set_ace() argument
981 smb_copy_sid(&ace->sid, sid); in smb_set_ace()
982 ace->size = cpu_to_le16(1 + 1 + 2 + 4 + 1 + 1 + 6 + (sid->num_subauth * 4)); in smb_set_ace()
1042 if (!compare_sids(&creator_owner, &parent_aces->sid)) { in smb_inherit_dacl()
1046 } else if (!compare_sids(&creator_group, &parent_aces->sid)) { in smb_inherit_dacl()
1052 psid = &parent_aces->sid; in smb_inherit_dacl()
1064 psid = &parent_aces->sid; in smb_inherit_dacl()
1170 struct smb_sid sid; in smb_check_perm_dacl() local
1229 id_to_sid(uid, sid_type, &sid); in smb_check_perm_dacl()
1233 if (!compare_sids(&sid, &ace->sid) || in smb_check_perm_dacl()
1234 !compare_sids(&sid_unix_NFS_mode, &ace->sid)) { in smb_check_perm_dacl()
1238 if (!compare_sids(&sid_everyone, &ace->sid)) in smb_check_perm_dacl()