From 4d4a59ece289065aa31d9342cb9666b0b7bd779c Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 13 Dec 2018 21:22:27 +0100 Subject: [PATCH] lib: Use dom_sid_str_buf Signed-off-by: Volker Lendecke Reviewed-by: Gary Lockyer --- source3/lib/privileges.c | 11 ++++++++--- source3/lib/util_sid.c | 3 ++- source3/lib/util_wellknown.c | 7 +++++-- source3/lib/winbind_util.c | 3 ++- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/source3/lib/privileges.c b/source3/lib/privileges.c index c02d4c9884c..19412133342 100644 --- a/source3/lib/privileges.c +++ b/source3/lib/privileges.c @@ -168,13 +168,16 @@ bool get_privileges_for_sids(uint64_t *privileges, struct dom_sid *slist, int sc *privileges = 0; for ( i=0; isids[i].sid, &sid_array, &num_sids); if (!NT_STATUS_IS_OK(status)) { + struct dom_sid_buf buf; DEBUG(3, ("could not add SID to array: %s\n", - sid_string_dbg(info3->sids[i].sid))); + dom_sid_str_buf(info3->sids[i].sid, &buf))); return status; } } diff --git a/source3/lib/util_wellknown.c b/source3/lib/util_wellknown.c index a3db9ab5b44..8cb7a36ddec 100644 --- a/source3/lib/util_wellknown.c +++ b/source3/lib/util_wellknown.c @@ -116,6 +116,7 @@ bool lookup_wellknown_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid, struct dom_sid dom_sid; uint32_t rid; const struct rid_name_map *users = NULL; + struct dom_sid_buf buf; sid_copy(&dom_sid, sid); if (!sid_split_rid(&dom_sid, &rid)) { @@ -133,7 +134,8 @@ bool lookup_wellknown_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid, } if (users == NULL) { - DEBUG(10, ("SID %s is no special sid\n", sid_string_dbg(sid))); + DEBUG(10, ("SID %s is no special sid\n", + dom_sid_str_buf(sid, &buf))); return False; } @@ -144,7 +146,8 @@ bool lookup_wellknown_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid, } } - DEBUG(10, ("RID of special SID %s not found\n", sid_string_dbg(sid))); + DEBUG(10, ("RID of special SID %s not found\n", + dom_sid_str_buf(sid, &buf))); return False; } diff --git a/source3/lib/winbind_util.c b/source3/lib/winbind_util.c index 427831f04c8..a072166ce18 100644 --- a/source3/lib/winbind_util.c +++ b/source3/lib/winbind_util.c @@ -94,6 +94,7 @@ bool winbind_lookup_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid, enum wbcSidType type; char *domain_name = NULL; char *account_name = NULL; + struct dom_sid_buf buf; memcpy(&dom_sid, sid, sizeof(dom_sid)); @@ -112,7 +113,7 @@ bool winbind_lookup_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid, *name_type = (enum lsa_SidType)type; DEBUG(10, ("winbind_lookup_sid: SUCCESS: SID %s -> %s %s\n", - sid_string_dbg(sid), domain_name, account_name)); + dom_sid_str_buf(sid, &buf), domain_name, account_name)); wbcFreeMemory(domain_name); wbcFreeMemory(account_name); -- 2.34.1