diff --git a/source3/winbindd/idmap_autorid.c b/source3/winbindd/idmap_autorid.c index 35b4b68ba56..963d73b0e48 100644 --- a/source3/winbindd/idmap_autorid.c +++ b/source3/winbindd/idmap_autorid.c @@ -641,13 +641,6 @@ static NTSTATUS idmap_autorid_initialize(struct idmap_domain *dom) config->maxranges)); } - status = idmap_autorid_saveconfig(autorid_db, config); - - if (!NT_STATUS_IS_OK(status)) { - DEBUG(1, ("Failed to store configuration data!\n")); - goto error; - } - DEBUG(5, ("%d domain ranges with a size of %d are available\n", config->maxranges, config->rangesize)); @@ -666,6 +659,12 @@ static NTSTATUS idmap_autorid_initialize(struct idmap_domain *dom) dom->private_data = commonconfig; + status = idmap_autorid_saveconfig(autorid_db, config); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(1, ("Failed to store configuration data!\n")); + goto error; + } + /* preallocate well-known SIDs in the pool */ status = idmap_autorid_preallocate_wellknown(dom);