diff options
author | Volker Lendecke <vl@samba.org> | 2018-11-02 20:58:59 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2018-11-09 22:42:29 +0100 |
commit | beba440c0ed6eae9cad86da2863b730a00a23a6f (patch) | |
tree | 59504c020e2df840117b8c0a830d5c0288daa982 /source3/groupdb | |
parent | 9060b26caca327c7dc1f3b69b28a7acfcf2f7d3d (diff) | |
download | samba-beba440c0ed6eae9cad86da2863b730a00a23a6f.tar.gz |
passdb: Use dom_sid_str_buf
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/groupdb')
-rw-r--r-- | source3/groupdb/mapping_tdb.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/source3/groupdb/mapping_tdb.c b/source3/groupdb/mapping_tdb.c index 6bb8c3269b2..41b56be5ca3 100644 --- a/source3/groupdb/mapping_tdb.c +++ b/source3/groupdb/mapping_tdb.c @@ -451,7 +451,7 @@ static bool enum_group_mapping(const struct dom_sid *domsid, static NTSTATUS one_alias_membership(const struct dom_sid *member, struct dom_sid **sids, size_t *num) { - fstring tmp; + struct dom_sid_buf tmp; fstring key; char *string_sid; TDB_DATA dbuf; @@ -460,7 +460,7 @@ static NTSTATUS one_alias_membership(const struct dom_sid *member, TALLOC_CTX *frame = talloc_stackframe(); slprintf(key, sizeof(key), "%s%s", MEMBEROF_PREFIX, - sid_to_fstring(tmp, member)); + dom_sid_str_buf(member, &tmp)); status = dbwrap_fetch_bystring(db, frame, key, &dbuf); if (!NT_STATUS_IS_OK(status)) { @@ -532,7 +532,7 @@ static NTSTATUS add_aliasmem(const struct dom_sid *alias, const struct dom_sid * { GROUP_MAP *map; char *key; - fstring string_sid; + struct dom_sid_buf string_sid; char *new_memberstring; struct db_record *rec; NTSTATUS status; @@ -559,10 +559,8 @@ static NTSTATUS add_aliasmem(const struct dom_sid *alias, const struct dom_sid * if (is_aliasmem(alias, member)) return NT_STATUS_MEMBER_IN_ALIAS; - sid_to_fstring(string_sid, member); - key = talloc_asprintf(talloc_tos(), "%s%s", MEMBEROF_PREFIX, - string_sid); + dom_sid_str_buf(member, &string_sid)); if (key == NULL) { return NT_STATUS_NO_MEMORY; } @@ -583,13 +581,13 @@ static NTSTATUS add_aliasmem(const struct dom_sid *alias, const struct dom_sid * value = dbwrap_record_get_value(rec); - sid_to_fstring(string_sid, alias); + dom_sid_str_buf(alias, &string_sid); if (value.dptr != NULL) { new_memberstring = talloc_asprintf( - key, "%s %s", (char *)(value.dptr), string_sid); + key, "%s %s", (char *)(value.dptr), string_sid.buf); } else { - new_memberstring = talloc_strdup(key, string_sid); + new_memberstring = talloc_strdup(key, string_sid.buf); } if (new_memberstring == NULL) { |