X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Foverlays%2Frwmconf.c;h=804f7566203ba9d41cded6d0641cee7277edf38a;hb=8bdfd2edbb7a09f5bfe96b2bca043680f731237a;hp=a0856347751f1a678a659c3c269d45bba64494cb;hpb=3aefa9434d2be838aa32a1824fc5b13bab35b0f5;p=openldap diff --git a/servers/slapd/overlays/rwmconf.c b/servers/slapd/overlays/rwmconf.c index a085634775..804f756620 100644 --- a/servers/slapd/overlays/rwmconf.c +++ b/servers/slapd/overlays/rwmconf.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1999-2007 The OpenLDAP Foundation. + * Copyright 1999-2009 The OpenLDAP Foundation. * Portions Copyright 1999-2003 Howard Chu. * Portions Copyright 2000-2003 Pierangelo Masarati. * All rights reserved. @@ -71,6 +71,13 @@ rwm_map_config( return 1; } + if ( !is_oc && map->map == NULL ) { + /* only init if required */ + if ( rwm_map_init( map, &mapping ) != LDAP_SUCCESS ) { + return 1; + } + } + if ( strcmp( argv[2], "*" ) == 0 ) { if ( argc < 4 || strcmp( argv[3], "*" ) == 0 ) { map->drop_missing = ( argc < 4 ); @@ -225,11 +232,6 @@ rwm_map_config( rwm_mapping_cmp, rwm_mapping_dup ); success_return:; - if ( !is_oc && map->map == NULL ) { - /* only init if required */ - rc = rwm_map_init( map, &mapping ) != LDAP_SUCCESS; - } - return rc; error_return:;