Lines Matching defs:usid
187 static int is_world_sid(const SID * usid)
191 ((usid->sub_authority_count == 1)
192 && (usid->identifier_authority.high_part == const_cpu_to_be16(0))
193 && (usid->identifier_authority.low_part == const_cpu_to_be32(1))
194 && (usid->sub_authority[0] == const_cpu_to_le32(0)))
197 || ((usid->sub_authority_count == 2)
198 && (usid->identifier_authority.high_part == const_cpu_to_be16(0))
199 && (usid->identifier_authority.low_part == const_cpu_to_be32(5))
200 && (usid->sub_authority[0] == const_cpu_to_le32(32))
201 && (usid->sub_authority[1] == const_cpu_to_le32(545)))
204 || ((usid->sub_authority_count == 1)
205 && (usid->identifier_authority.high_part == const_cpu_to_be16(0))
206 && (usid->identifier_authority.low_part == const_cpu_to_be32(5))
207 && (usid->sub_authority[0] == const_cpu_to_le32(11)))
211 || ((usid->sub_authority_count == 1)
212 && (usid->identifier_authority.high_part == const_cpu_to_be16(0))
213 && (usid->identifier_authority.low_part == const_cpu_to_be32(5))
214 && (usid->sub_authority[0] == const_cpu_to_le32(4)))
225 BOOL ntfs_is_user_sid(const SID *usid)
227 return ((usid->sub_authority_count == 5)
228 && (usid->identifier_authority.high_part == const_cpu_to_be16(0))
229 && (usid->identifier_authority.low_part == const_cpu_to_be32(5))
230 && (usid->sub_authority[0] == const_cpu_to_le32(21)));
242 static BOOL ntfs_known_group_sid(const SID *usid)
245 return ((usid->sub_authority_count == 1)
246 && (usid->identifier_authority.high_part == const_cpu_to_be16(0))
247 && (usid->identifier_authority.low_part == const_cpu_to_be32(5))
248 && (le32_to_cpu(usid->sub_authority[0]) >= 1)
249 && (le32_to_cpu(usid->sub_authority[0]) <= 6));
405 * Find usid mapped to a Linux user
493 * Find Linux owner mapped to a usid
497 uid_t ntfs_find_user(const struct MAPPING* usermapping, const SID *usid)
503 while (p && p->xid && !ntfs_same_sid(usid, p->sid))
509 uid = findimplicit(usid,p->sid,0);
692 const SID *usid, const SID *gsid, BOOL fordir,
712 usidsz = ntfs_sid_size(usid);
860 memcpy(&pnewace->sid, usid, usidsz);
935 && ntfs_same_sid(&poldace->sid, usid)) {
1602 const SID *usid, struct MAPPING* const mapping[],
1631 sid = usid;
1764 const SID *usid, struct MAPPING* const mapping[],
1787 sid = usid;
2101 int isdir, const SID *usid, const SID *gsid)
2128 usidsz = ntfs_sid_size(usid);
2134 adminowns = ntfs_same_sid(usid, adminsid)
2136 groupowns = !adminowns && ntfs_same_sid(usid, gsid);
2185 if (sid && ntfs_same_sid(sid,usid))
2252 usid, mapping, flags, pxace, pset);
2310 ok = build_user_grants(pacl,usid,
2438 const SID * usid, const SID * gsid)
2457 usidsz = ntfs_sid_size(usid);
2462 adminowns = ntfs_same_sid(usid, adminsid)
2464 groupowns = !adminowns && ntfs_same_sid(usid, gsid);
2547 memcpy((char*)&pdace->sid, usid, usidsz);
2575 memcpy((char*)&pgace->sid, usid, usidsz);
2752 int isdir, const SID *usid, const SID *gsid)
2765 usidsz = ntfs_sid_size(usid);
2773 + usidsz + gsidsz /* usid and gsid */
2811 pxdesc, isdir, usid, gsid);
2814 /* append usid and gsid */
2816 + aclsz], usid, usidsz);
2852 int isdir, const SID * usid, const SID * gsid)
2864 usidsz = ntfs_sid_size(usid);
2872 + usidsz + gsidsz /* usid and gsid */
2902 mode, isdir, usid, gsid);
2905 /* append usid and gsid */
2907 + aclsz], usid, usidsz);
3193 const SID *usid, const SID *gsid, BOOL isdir)
3224 if (ntfs_same_sid(usid, &pace->sid)
3281 const SID *usid, BOOL isdir)
3314 if ((ntfs_same_sid(usid, &pace->sid)
3322 if (ntfs_same_sid(usid, &pace->sid)
3471 const SID *usid, const SID *gsid, BOOL isdir)
3505 if ((ntfs_same_sid(usid, &pace->sid)
3567 const SID *usid;
3594 usid = &pace->sid;
3596 usid = (const SID*)&securattr[le32_to_cpu(phead->owner)];
3597 return (usid);
3671 const SID *usid, const SID *gsid, BOOL isdir)
3713 groupowns = ntfs_same_sid(gsid,usid);
3763 if (ntfs_same_sid(usid, &pace->sid)) {
3774 if (ntfs_same_sid(gsid,usid)) {
3778 if (ntfs_same_sid(&pace->sid,usid))
3827 if (ntfs_same_sid(usid,adminsid))
4116 const SID *usid, const SID *gsid, BOOL isdir)
4122 adminowns = ntfs_same_sid(usid,adminsid)
4124 groupowns = !adminowns && ntfs_same_sid(gsid,usid);
4126 perm = build_ownadmin_permissions(securattr, usid, gsid, isdir);
4129 perm = build_owngrp_permissions(securattr, usid, isdir);
4131 perm = build_std_permissions(securattr, usid, gsid, isdir);