server: Owner and group SIDs in security descriptors are optional in many server calls.

So print "<not present>" when they aren't provided instead of "<invalid sid>".
This commit is contained in:
Rob Shearman 2007-10-16 10:19:21 +01:00 committed by Alexandre Julliard
parent 2cecc630b6
commit 3f4c267028
1 changed files with 8 additions and 2 deletions

View File

@ -711,12 +711,18 @@ static void dump_inline_security_descriptor( const struct security_descriptor *s
fprintf( stderr, ",owner=" );
if ((sd->owner_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->owner_len > size))
return;
dump_inline_sid( (const SID *)((const char *)sd + offset), sd->owner_len );
if (sd->owner_len)
dump_inline_sid( (const SID *)((const char *)sd + offset), sd->owner_len );
else
fprintf( stderr, "<not present>" );
offset += sd->owner_len;
fprintf( stderr, ",group=" );
if ((sd->group_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->group_len > size))
return;
dump_inline_sid( (const SID *)((const char *)sd + offset), sd->group_len );
if (sd->group_len)
dump_inline_sid( (const SID *)((const char *)sd + offset), sd->group_len );
else
fprintf( stderr, "<not present>" );
offset += sd->group_len;
fprintf( stderr, ",sacl=" );
if ((sd->sacl_len >= MAX_ACL_LEN) || (offset + sd->sacl_len > size))