diff options
Diffstat (limited to 'source/lib/util_sid.c')
-rw-r--r-- | source/lib/util_sid.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source/lib/util_sid.c b/source/lib/util_sid.c index 3be52dd9f79..307f3e3415d 100644 --- a/source/lib/util_sid.c +++ b/source/lib/util_sid.c @@ -74,6 +74,8 @@ const DOM_SID global_sid_Builtin_Backup_Operators = /* Builtin backup operators { 1, 2, {0,0,0,0,0,5}, {32,551,0,0,0,0,0,0,0,0,0,0,0,0,0}}; const DOM_SID global_sid_Builtin_Replicator = /* Builtin replicator */ { 1, 2, {0,0,0,0,0,5}, {32,552,0,0,0,0,0,0,0,0,0,0,0,0,0}}; +const DOM_SID global_sid_Builtin_PreWin2kAccess = /* Builtin pre win2k access */ +{ 1, 2, {0,0,0,0,0,5}, {32,554,0,0,0,0,0,0,0,0,0,0,0,0,0}}; const DOM_SID global_sid_Unix_Users = /* Unmapped Unix users */ { 1, 1, {0,0,0,0,0,22}, {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}; @@ -533,6 +535,24 @@ char *sid_binstring(const DOM_SID *sid) if (!buf) return NULL; sid_linearize(buf, len, sid); + s = binary_string_rfc2254(buf, len); + free(buf); + return s; +} + +/***************************************************************** + Return the binary string representation of a DOM_SID. + Caller must free. +*****************************************************************/ + +char *sid_binstring_hex(const DOM_SID *sid) +{ + char *buf, *s; + int len = sid_size(sid); + buf = SMB_MALLOC(len); + if (!buf) + return NULL; + sid_linearize(buf, len, sid); s = binary_string(buf, len); free(buf); return s; |