From 3f4c2670286c7fbca7a746173d99309c79699cf2 Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Tue, 16 Oct 2007 10:19:21 +0100 Subject: [PATCH] server: Owner and group SIDs in security descriptors are optional in many server calls. So print "" when they aren't provided instead of "". --- server/trace.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/server/trace.c b/server/trace.c index 4471d6fff31..e0a2e96346d 100644 --- a/server/trace.c +++ b/server/trace.c @@ -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, "" ); 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, "" ); offset += sd->group_len; fprintf( stderr, ",sacl=" ); if ((sd->sacl_len >= MAX_ACL_LEN) || (offset + sd->sacl_len > size))