From f3549172083641d0e275a6312edf4adc6b740b98 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sun, 20 Jul 2014 12:11:16 +0200 Subject: [PATCH] s3:idmap: move loading of idmap options together before range checking in idmap_init_domain() Signed-off-by: Michael Adam Reviewed-by: Volker Lendecke --- source3/winbindd/idmap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source3/winbindd/idmap.c b/source3/winbindd/idmap.c index c76c35022de..e62f477764d 100644 --- a/source3/winbindd/idmap.c +++ b/source3/winbindd/idmap.c @@ -219,7 +219,11 @@ static struct idmap_domain *idmap_init_domain(TALLOC_CTX *mem_ctx, goto fail; } + result->read_only = lp_parm_bool(-1, config_option, "read only", false); range = lp_parm_const_string(-1, config_option, "range", NULL); + + talloc_free(config_option); + if (range == NULL) { if (check_range) { DEBUG(1, ("idmap range not specified for domain %s\n", @@ -236,10 +240,6 @@ static struct idmap_domain *idmap_init_domain(TALLOC_CTX *mem_ctx, } } - result->read_only = lp_parm_bool(-1, config_option, "read only", false); - - talloc_free(config_option); - if (result->low_id > result->high_id) { DEBUG(1, ("Error: invalid idmap range detected: %lu - %lu\n", (unsigned long)result->low_id, -- 2.11.4.GIT