diff options
author | Volker Lendecke <vl@samba.org> | 2011-03-08 21:55:58 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2011-03-18 15:46:37 +0100 |
commit | 5006dcff4e15b7f840093e0c6c4e6f46a4088120 (patch) | |
tree | dfd77e1246fc9a545a0f9526ca8ea2d4014883f1 /source3 | |
parent | 39478450418cc65f6c4f753ffa08dca7f7f7ebeb (diff) | |
download | samba-5006dcff4e15b7f840093e0c6c4e6f46a4088120.tar.gz samba-5006dcff4e15b7f840093e0c6c4e6f46a4088120.tar.bz2 samba-5006dcff4e15b7f840093e0c6c4e6f46a4088120.zip |
idmap-autorid: Slightly simplify idmap_autorid_get_domainrange
Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/winbindd/idmap_autorid.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/source3/winbindd/idmap_autorid.c b/source3/winbindd/idmap_autorid.c index 434de25171..b162b62355 100644 --- a/source3/winbindd/idmap_autorid.c +++ b/source3/winbindd/idmap_autorid.c @@ -54,15 +54,12 @@ static NTSTATUS idmap_autorid_get_domainrange(struct db_context *db, { NTSTATUS ret; uint32_t domainnum, hwm; - char *sidstr, *numstr; + fstring sidstr; + char *numstr; struct autorid_domain_config *cfg; cfg = (struct autorid_domain_config *)private_data; - sidstr = dom_sid_string(talloc_tos(), &(cfg->sid)); - - if (!sidstr) { - return NT_STATUS_NO_MEMORY; - } + dom_sid_string_buf(&(cfg->sid), sidstr, sizeof(sidstr)); if (!dbwrap_fetch_uint32(db, sidstr, &domainnum)) { DEBUG(10, ("Acquiring new range for domain %s\n", sidstr)); @@ -120,11 +117,9 @@ static NTSTATUS idmap_autorid_get_domainrange(struct db_context *db, DEBUG(10, ("Using range #%d for domain %s\n", domainnum, sidstr)); cfg->domainnum = domainnum; - talloc_free(sidstr); return NT_STATUS_OK; error: - talloc_free(sidstr); return ret; } |