]> git.sur5r.net Git - openldap/commitdiff
ITS#6670
authorQuanah Gibson-Mount <quanah@openldap.org>
Tue, 4 Jan 2011 20:55:09 +0000 (20:55 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 4 Jan 2011 20:55:09 +0000 (20:55 +0000)
CHANGES
servers/slapd/overlays/memberof.c

diff --git a/CHANGES b/CHANGES
index ff643d0e47ba1ed94b948ab77b387aaa1dbb77cc..d4c1abff7ae4848b3199b3fcb50a3e35bf561a20 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -68,6 +68,7 @@ OpenLDAP 2.4.24 Engineering
        Fixed slapo-dynlist callbacks (ITS#6752)
        Fixed slapo-dynlist entry handling (ITS#6752)
        Fixed slapo-memberof log messages (ITS#6748)
+       Fixed slapo-memberof with an empty groupOfNames (ITS#6670)
        Fixed slapo-pcache callback freeing (ITS#6640)
        Fixed slapo-pcache to ignore undefined attrs (ITS#6600)
        Fixed slapo-ppolicy don't update opattrs on consumers (ITS#6608)
index 1f6671ebbb8936b6fc269a63f4a8d702de66b3c7..f4c013118c3f1b5e288db2b77f471d5cd69c88ce 100644 (file)
@@ -537,6 +537,10 @@ memberof_op_add( Operation *op, SlapReply *rs )
                        for ( i = 0; !BER_BVISNULL( &a->a_nvals[ i ] ); i++ ) {
                                Entry           *e = NULL;
 
+                               /* ITS#6670 Ignore member pointing to this entry */
+                               if ( dn_match( &a->a_nvals[i], &save_ndn ))
+                                       continue;
+
                                rc = be_entry_get_rw( op, &a->a_nvals[ i ],
                                                NULL, NULL, 0, &e );
                                if ( rc == LDAP_SUCCESS ) {
@@ -615,6 +619,10 @@ memberof_op_add( Operation *op, SlapReply *rs )
                                send_ldap_result( op, rs );
                                goto done;
                        }
+                       /* ITS#6670 Ignore member pointing to this entry */
+                       if ( dn_match( &a->a_nvals[i], &save_ndn ))
+                               continue;
+
                        rc = be_entry_get_rw( op, &a->a_nvals[ i ],
                                        NULL, NULL, 0, &e );
                        op->o_bd->bd_info = (BackendInfo *)on;
@@ -822,6 +830,10 @@ memberof_op_modify( Operation *op, SlapReply *rs )
                                                int             rc;
                                                Entry           *e;
                
+                                               /* ITS#6670 Ignore member pointing to this entry */
+                                               if ( dn_match( &ml->sml_nvalues[i], &save_ndn ))
+                                                       continue;
+
                                                if ( be_entry_get_rw( op, &ml->sml_nvalues[ i ],
                                                                NULL, NULL, 0, &e ) == LDAP_SUCCESS )
                                                {
@@ -1033,6 +1045,10 @@ memberof_op_modify( Operation *op, SlapReply *rs )
                                        goto done2;
                                }
 
+                               /* ITS#6670 Ignore member pointing to this entry */
+                               if ( dn_match( &ml->sml_nvalues[i], &save_ndn ))
+                                       continue;
+
                                rc = be_entry_get_rw( op, &ml->sml_nvalues[ i ],
                                                NULL, NULL, 0, &e );
                                op->o_bd->bd_info = (BackendInfo *)on;
@@ -1194,6 +1210,10 @@ memberof_res_add( Operation *op, SlapReply *rs )
 
                        for ( i = 0; !BER_BVISNULL( &ma->a_nvals[ i ] ); i++ ) {
                
+                               /* ITS#6670 Ignore member pointing to this entry */
+                               if ( dn_match( &ma->a_nvals[i], &op->o_req_ndn ))
+                                       continue;
+
                                /* the modification is attempted
                                 * with the original identity */
                                (void)memberof_value_modify( op, rs,
@@ -1211,6 +1231,10 @@ memberof_res_add( Operation *op, SlapReply *rs )
                                a = attrs_find( a->a_next, mo->mo_ad_member ) )
                {
                        for ( i = 0; !BER_BVISNULL( &a->a_nvals[ i ] ); i++ ) {
+                               /* ITS#6670 Ignore member pointing to this entry */
+                               if ( dn_match( &a->a_nvals[i], &op->o_req_ndn ))
+                                       continue;
+
                                (void)memberof_value_modify( op, rs,
                                                &a->a_nvals[ i ],
                                                mo->mo_ad_memberof,