Lines Matching refs:sid

212  * @sid:	[IN]  SID for which to determine the maximum string size
215 * store the standard textual representation of the SID pointed to by @sid.
221 int ntfs_sid_to_mbs_size(const SID *sid)
225 if (!ntfs_valid_sid(sid)) {
244 if (!sid->identifier_authority.high_part)
252 size += (1 + 10) * sid->sub_authority_count;
260 * @sid: [IN] SID to convert
264 * Convert the SID pointed to by @sid to its standard textual representation.
288 char *ntfs_sid_to_mbs(const SID *sid, char *sid_str, size_t sid_str_size)
296 * No need to check @sid if !@sid_str since ntfs_sid_to_mbs_size() will
297 * check @sid, too. 8 is the minimum SID string size.
299 if (sid_str && (sid_str_size < 8 || !ntfs_valid_sid(sid))) {
305 cnt = ntfs_sid_to_mbs_size(sid);
319 i = snprintf(s, cnt, "S-%hhu-", (unsigned char)sid->revision);
326 u += (u64)sid->identifier_authority.value[i] << j;
327 if (!sid->identifier_authority.high_part)
336 for (j = 0; j < sid->sub_authority_count; j++) {
337 leauth = sid->sub_authority[j];
3368 SID *sid;
3386 sid = (SID*)((u8*)sd + sizeof(SECURITY_DESCRIPTOR_ATTR));
3387 sid->revision = SID_REVISION;
3388 sid->sub_authority_count = 2;
3389 sid->sub_authority[0] = const_cpu_to_le32(SECURITY_BUILTIN_DOMAIN_RID);
3390 sid->sub_authority[1] = const_cpu_to_le32(DOMAIN_ALIAS_RID_ADMINS);
3391 sid->identifier_authority.value[5] = 5;
3392 sd->owner = cpu_to_le32((u8*)sid - (u8*)sd);
3394 sid = (SID*)((u8*)sid + sizeof(SID) + 4);
3395 sid->revision = SID_REVISION;
3396 sid->sub_authority_count = 2;
3397 sid->sub_authority[0] = const_cpu_to_le32(SECURITY_BUILTIN_DOMAIN_RID);
3398 sid->sub_authority[1] = const_cpu_to_le32(DOMAIN_ALIAS_RID_ADMINS);
3399 sid->identifier_authority.value[5] = 5;
3400 sd->group = cpu_to_le32((u8*)sid - (u8*)sd);
3402 acl = (ACL*)((u8*)sid + sizeof(SID) + 4);
3413 ace->sid.revision = SID_REVISION;
3414 ace->sid.sub_authority_count = 1;
3415 ace->sid.sub_authority[0] = const_cpu_to_le32(0);
3416 ace->sid.identifier_authority.value[5] = 1;
3709 /* or reuse old gid and sid for cacheing */
3831 /* or reuse old gid and sid for cacheing */
4174 SID *sid;
4180 sid = (SID*)ntfs_malloc(sidsz);
4181 if (sid) {
4182 memcpy(sid,usid,sidsz);
4187 usermapping->sid = sid;
4190 groupmapping->sid = sid;
4220 if (ntfs_same_sid(mapping1->sid,mapping2->sid)) {
4229 if (ntfs_same_sid(mapping1->sid,mapping2->sid)) {