~ubuntu-branches/ubuntu/trusty/openldap/trusty-updates

« back to all changes in this revision

Viewing changes to servers/slapd/overlays/refint.c

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-01-23 10:01:13 UTC
  • mfrom: (1.3.4)
  • mto: This revision was merged to the branch mainline in revision 47.
  • Revision ID: package-import@ubuntu.com-20120123100113-z3mg83hvuplv9lyj
Tags: upstream-2.4.28
ImportĀ upstreamĀ versionĀ 2.4.28

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* refint.c - referential integrity module */
2
 
/* $OpenLDAP: pkg/ldap/servers/slapd/overlays/refint.c,v 1.19.2.19 2011/01/26 23:23:35 quanah Exp $ */
 
2
/* $OpenLDAP$ */
3
3
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4
4
 *
5
5
 * Copyright 2004-2011 The OpenLDAP Foundation.
526
526
{
527
527
        dependent_data  *dp;
528
528
        SlapReply               rs = {REP_RESULT};
 
529
        Operation               op2;
529
530
        int             rc;
530
531
 
531
532
        op->o_callback->sc_response = refint_search_cb;
564
565
         *
565
566
         */
566
567
 
 
568
        op2 = *op;
567
569
        for ( dp = rq->attrs; dp; dp = dp->next ) {
568
 
                Operation       op2 = *op;
569
570
                SlapReply       rs2 = {REP_RESULT};
570
571
                refint_attrs    *ra;
571
572
                Modifications   *m;
572
573
 
573
574
                if ( dp->attrs == NULL ) continue; /* TODO: Is this needed? */
574
575
 
575
 
                op2.o_tag = LDAP_REQ_MODIFY;
576
 
                op2.orm_modlist = NULL;
577
 
                op2.o_req_dn    = dp->dn;
578
 
                op2.o_req_ndn   = dp->ndn;
579
576
                op2.o_bd = select_backend( &dp->ndn, 1 );
580
577
                if ( !op2.o_bd ) {
581
578
                        Debug( LDAP_DEBUG_TRACE,
583
580
                                dp->dn.bv_val, 0, 0 );
584
581
                        continue;
585
582
                }
 
583
                op2.o_tag = LDAP_REQ_MODIFY;
 
584
                op2.orm_modlist = NULL;
 
585
                op2.o_req_dn    = dp->dn;
 
586
                op2.o_req_ndn   = dp->ndn;
 
587
                /* Internal ops, never replicate these */
 
588
                op2.orm_no_opattrs = 1;
 
589
                op2.o_dont_replicate = 1;
586
590
 
587
591
                /* Set our ModifiersName */
588
592
                if ( SLAP_LASTMOD( op->o_bd ) ) {
670
674
 
671
675
                op2.o_dn = op2.o_bd->be_rootdn;
672
676
                op2.o_ndn = op2.o_bd->be_rootndn;
673
 
                slap_op_time( &op2.o_time, &op2.o_tincr );
674
677
                rc = op2.o_bd->be_modify( &op2, &rs2 );
675
678
                if ( rc != LDAP_SUCCESS ) {
676
679
                        Debug( LDAP_DEBUG_TRACE,