1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-30 19:42:05 +03:00

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 commit is contained in:
Volker Lendecke
2007-12-15 22:08:09 +01:00
parent c7c885078b
commit 7b8276aaa4

View File

@ -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);