]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Only create map when update section exists
authorNick Porter <nick@portercomputing.co.uk>
Fri, 15 Dec 2023 21:11:54 +0000 (21:11 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Fri, 15 Dec 2023 21:11:54 +0000 (21:11 +0000)
src/modules/rlm_ldap/rlm_ldap.c

index 66e889a79bc31f22abf821025fa1cbe6ca8c147d..44a4b25a3ecc8c8337698da2d320eaeb1d910481 100644 (file)
@@ -2310,7 +2310,8 @@ static int ldap_update_section_parse(TALLOC_CTX *ctx, call_env_parsed_head_t *ou
                MEM(maps = talloc(parsed, map_list_t));
                map_list_init(maps);
 
-               if (map_afrom_cs(maps, maps, update, t_rules, t_rules, fr_ldap_map_verify, NULL, LDAP_MAX_ATTRMAP) < 0) {
+               if (update && (map_afrom_cs(maps, maps, update, t_rules, t_rules, fr_ldap_map_verify,
+                                           NULL, LDAP_MAX_ATTRMAP)) < 0) {
                        call_env_parsed_free(out, parsed);
                        return -1;
                }