s3:idmap_autorid: use "idmap config <DOMAIN> : rangesize" instead of "autorid:rangesize"
authorMichael Adam <obnox@samba.org>
Tue, 7 Jun 2011 11:02:04 +0000 (13:02 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 7 Jun 2011 13:55:08 +0000 (15:55 +0200)
source3/winbindd/idmap_autorid.c

index 92cc9bcb00d6413a0f8dd59f214b6b0149bab4bc..6252c5d946f78a538e7b5a7106cca67bfc16956f 100644 (file)
@@ -436,6 +436,7 @@ static NTSTATUS idmap_autorid_initialize(struct idmap_domain *dom)
        NTSTATUS status;
        uint32_t hwm;
        TALLOC_CTX *frame = talloc_stackframe();
+       char *config_option = NULL;
 
        config = TALLOC_ZERO_P(frame, struct autorid_global_config);
        if (!config) {
@@ -449,8 +450,15 @@ static NTSTATUS idmap_autorid_initialize(struct idmap_domain *dom)
                goto error;
        }
 
+       config_option = talloc_asprintf(frame, "idmap config %s", dom->name);
+       if (config_option == NULL) {
+               DEBUG(0, ("Out of memory!\n"));
+               status = NT_STATUS_NO_MEMORY;
+               goto error;
+       }
+
        config->minvalue = dom->low_id;
-       config->rangesize = lp_parm_int(-1, "autorid", "rangesize", 100000);
+       config->rangesize = lp_parm_int(-1, config_option, "rangesize", 100000);
 
        if (config->rangesize < 2000) {
                DEBUG(1, ("autorid rangesize must be at least 2000\n"));