/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2000-2006 The OpenLDAP Foundation.
+ * Copyright 2000-2011 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
/*
* 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 ) ) {
}
#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;