]> git.sur5r.net Git - openldap/commitdiff
if there is only one member_ad, and it's not mapped, consider it as old-style member...
authorQuanah Gibson-Mount <quanah@openldap.org>
Tue, 8 Jul 2008 23:08:18 +0000 (23:08 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 8 Jul 2008 23:08:18 +0000 (23:08 +0000)
servers/slapd/overlays/dynlist.c

index 9b2ac459c5a2c2e5fd9c790482942ee5f48dca2c..ba9a9d2ac51772064c4a027733d09169e0e0ddb9 100644 (file)
@@ -178,10 +178,10 @@ dynlist_sc_update( Operation *op, SlapReply *rs )
                goto done;
        }
 
-       for ( dlm = dlc->dlc_dli->dli_dlm; dlm; dlm = dlm->dlm_next ) {
-               if (dlm->dlm_mapped_ad != NULL)
-                       continue;
-
+       /* if there is only one member_ad, and it's not mapped,
+        * consider it as old-style member listing */
+       dlm = dlc->dlc_dli->dli_dlm;
+       if ( dlm && dlm->dlm_mapped_ad == NULL && dlm->dlm_next == NULL ) {
                /* if access allowed, try to add values, emulating permissive
                 * control to silently ignore duplicates */
                if ( access_allowed( op, rs->sr_entry, slap_schema.si_ad_entry,