idmap_autorid: Use acquire_range directly
authorVolker Lendecke <vl@samba.org>
Fri, 2 Dec 2016 15:25:10 +0000 (15:25 +0000)
committerVolker Lendecke <vl@samba.org>
Fri, 16 Dec 2016 16:38:20 +0000 (17:38 +0100)
idmap_autorid_get_domainrange is reading again for an existing mapping. We
know we need to allocate here, so avoid passing down that r/o boolean :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/winbindd/idmap_autorid.c

index bf908f488d8bcfd4e248dc5b0dadff78b0d52ad2..c27c5035562d1adb64bc25e61b96889579187763 100644 (file)
@@ -656,7 +656,7 @@ static NTSTATUS idmap_autorid_sid_to_id(struct idmap_tdb_common_context *common,
        return NT_STATUS_NONE_MAPPED;
 
 allocate:
-       ret = idmap_autorid_get_domainrange(autorid_db, &range, false);
+       ret = idmap_autorid_acquire_range(autorid_db, &range);
        if (!NT_STATUS_IS_OK(ret)) {
                DBG_NOTICE("Could not determine range for domain: %s, "
                           "check previous messages for reason\n",