X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibrewrite%2Fconfig.c;h=c542f5759caed5ad9888d53a98481d1cfe972d6a;hb=48685b7962e9c365752a7eaeaeda9785cdee7946;hp=a3956ec9233d61f6a891f5bdbb74509ba53330a1;hpb=d34fffcaf9edc00262209fbe6e04bb15805dbd37;p=openldap diff --git a/libraries/librewrite/config.c b/libraries/librewrite/config.c index a3956ec923..c542f5759c 100644 --- a/libraries/librewrite/config.c +++ b/libraries/librewrite/config.c @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 2000-2005 The OpenLDAP Foundation. + * Copyright 2000-2012 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -413,8 +413,8 @@ rewrite_parse_builtin_map( /* * Built-in ldap map */ - if ( strcasecmp( argv[ MAP_TYPE ], "ldap" ) == 0 ) { - map->lb_type = REWRITE_BUILTIN_MAP_LDAP; + if (( map->lb_mapper = rewrite_mapper_find( argv[ MAP_TYPE ] ))) { + map->lb_type = REWRITE_BUILTIN_MAP; #ifdef USE_REWRITE_LDAP_PVT_THREADS if ( ldap_pvt_thread_mutex_init( & map->lb_mutex ) ) { @@ -424,13 +424,14 @@ rewrite_parse_builtin_map( } #endif /* USE_REWRITE_LDAP_PVT_THREADS */ - map->lb_private = map_ldap_parse( info, fname, lineno, + map->lb_private = map->lb_mapper->rm_config( fname, lineno, argc - 3, argv + 3 ); /* * Error */ } else { + free( map ); Debug( LDAP_DEBUG_ANY, "[%s:%d] unknown map type\n%s", fname, lineno, "" ); return -1;