From 4312ad8b98456a59bd5b020d83010695b4baf209 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 15 Dec 2007 22:08:09 +0100 Subject: sid_string_static is no more :-) We now have four ways to do sid_to_string: sid_to_string: Convert it into an existing fstring, when you have one sid_string_talloc: The obvious thing sid_string_tos: For the lazy, use only with care sid_string_dbg: The one to use in DEBUG statements (This used to be commit 7b8276aaa48852270c6b70b081c3f28e316a7a2c) --- source3/lib/util_sid.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c index e27c72dbc4..b28626cd66 100644 --- a/source3/lib/util_sid.c +++ b/source3/lib/util_sid.c @@ -202,17 +202,6 @@ char *sid_to_string(fstring sidstr_out, const DOM_SID *sid) return sidstr_out; } -/***************************************************************** - Useful function for debug lines. -*****************************************************************/ - -const char *sid_string_static(const DOM_SID *sid) -{ - static fstring sid_str; - sid_to_string(sid_str, sid); - return sid_str; -} - char *sid_string_talloc(TALLOC_CTX *mem_ctx, const DOM_SID *sid) { fstring sid_str; @@ -223,11 +212,19 @@ char *sid_string_talloc(TALLOC_CTX *mem_ctx, const DOM_SID *sid) return result; } +/***************************************************************** + Useful function for debug lines. +*****************************************************************/ + char *sid_string_dbg(const DOM_SID *sid) { return sid_string_talloc(debug_ctx(), sid); } +/***************************************************************** + Use with care! +*****************************************************************/ + char *sid_string_tos(const DOM_SID *sid) { return sid_string_talloc(talloc_tos(), sid); -- cgit