1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

add sid_string_talloc

(This used to be commit 9e3ef0923d71cc06b8445be2625ebd8dfed1b42d)
This commit is contained in:
Volker Lendecke 2007-12-15 19:00:42 +01:00
parent 43473c8ded
commit 2cb7f5f632

View File

@ -213,11 +213,19 @@ const char *sid_string_static(const DOM_SID *sid)
return sid_str;
}
char *sid_string_tos(const DOM_SID *sid)
char *sid_string_talloc(TALLOC_CTX *mem_ctx, const DOM_SID *sid)
{
fstring sid_str;
char *result;
sid_to_string(sid_str, sid);
return talloc_strdup(talloc_tos(), sid_str);
result = talloc_strdup(mem_ctx, sid_str);
SMB_ASSERT(result != NULL);
return result;
}
char *sid_string_tos(const DOM_SID *sid)
{
return sid_string_talloc(talloc_tos(), sid);
}
/*****************************************************************