mirror of
https://github.com/samba-team/samba.git
synced 2025-08-26 01:49:31 +03:00
idmap: Use dom_sid_str_buf
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
committed by
Jeremy Allison
parent
f564776ebd
commit
1e484da792
@ -36,7 +36,7 @@
|
||||
bool idmap_cache_find_sid2unixid(const struct dom_sid *sid, struct unixid *id,
|
||||
bool *expired)
|
||||
{
|
||||
fstring sidstr;
|
||||
struct dom_sid_buf sidstr;
|
||||
char *key;
|
||||
char *value = NULL;
|
||||
char *endptr;
|
||||
@ -45,7 +45,7 @@ bool idmap_cache_find_sid2unixid(const struct dom_sid *sid, struct unixid *id,
|
||||
struct unixid tmp_id;
|
||||
|
||||
key = talloc_asprintf(talloc_tos(), "IDMAP/SID2XID/%s",
|
||||
sid_to_fstring(sidstr, sid));
|
||||
dom_sid_str_buf(sid, &sidstr));
|
||||
if (key == NULL) {
|
||||
return false;
|
||||
}
|
||||
@ -289,11 +289,12 @@ void idmap_cache_set_sid2unixid(const struct dom_sid *sid, struct unixid *unix_i
|
||||
{
|
||||
time_t now = time(NULL);
|
||||
time_t timeout;
|
||||
fstring sidstr, key, value;
|
||||
fstring key, value;
|
||||
|
||||
if (!is_null_sid(sid)) {
|
||||
struct dom_sid_buf sidstr;
|
||||
fstr_sprintf(key, "IDMAP/SID2XID/%s",
|
||||
sid_to_fstring(sidstr, sid));
|
||||
dom_sid_str_buf(sid, &sidstr));
|
||||
switch (unix_id->type) {
|
||||
case ID_TYPE_UID:
|
||||
fstr_sprintf(value, "%d:U", (int)unix_id->id);
|
||||
|
Reference in New Issue
Block a user