Modifications *mod, **modtail, *modlast;
int gotcsn = 0, gotmname = 0, gotmtime = 0;
- if ( SLAP_LASTMOD( op->o_bd ) ) {
+ if ( SLAP_LASTMOD( op->o_bd ) && !op->orm_no_opattrs ) {
char *ptr;
timestamp.bv_val = timebuf;
for ( modtail = modsp; *modtail; modtail = &(*modtail)->sml_next ) {
typedef struct req_modify_s {
Modifications *rs_modlist;
int rs_increment; /* FIXME: temporary */
+ char rs_no_opattrs; /* don't att modify operational attrs */
} req_modify_s;
typedef struct req_modrdn_s {
#define orn_msgid oq_abandon.rs_msgid
#define orm_modlist oq_modify.rs_modlist
#define orm_increment oq_modify.rs_increment
+#define orm_no_opattrs oq_modify.rs_no_opattrs
#define ore_reqoid oq_extended.rs_reqoid
#define ore_flags oq_extended.rs_flags
if ( dni.mods ) {
op->o_tag = LDAP_REQ_MODIFY;
op->orm_modlist = dni.mods;
+ op->orm_no_opattrs = 1;
rc = be->be_modify( op, &rs_modify );
slap_mods_free( op->orm_modlist, 1 );
credentials=secret
searchbase="dc=example,dc=com"
filter="(objectClass=*)"
- attrs="*"
schemachecking=off
scope=sub
type=refreshOnly
#
# Test replication:
-# - start master
-# - start slave
+# - start producer
+# - start consumer
# - populate over ldap
# - perform some modifies and deleted
-# - attempt to modify the slave (referral)
+# - attempt to modify the consumer (referral)
# - retrieve database over ldap and compare against expected results
#
-echo "Starting master slapd on TCP/IP port $PORT1..."
+echo "Starting producer slapd on TCP/IP port $PORT1..."
. $CONFFILTER $BACKEND $MONITORDB < $SRMASTERCONF > $CONF1
$SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING > $LOG1 2>&1 &
PID=$!
sleep 1
-echo "Using ldapsearch to check that master slapd is running..."
+echo "Using ldapsearch to check that producer slapd is running..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \
'objectclass=*' > /dev/null 2>&1
exit $RC
fi
-echo "Using ldapadd to create the context prefix entry in the master..."
+echo "Using ldapadd to create the context prefix entry in the producer..."
$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD < \
$LDIFORDEREDCP > /dev/null 2>&1
RC=$?
exit $RC
fi
-echo "Starting slave slapd on TCP/IP port $PORT2..."
+echo "Starting consumer slapd on TCP/IP port $PORT2..."
. $CONFFILTER $BACKEND $MONITORDB < $R1SRSLAVECONF > $CONF2
$SLAPD -f $CONF2 -h $URI2 -d $LVL $TIMING > $LOG2 2>&1 &
SLAVEPID=$!
sleep 1
-echo "Using ldapsearch to check that slave slapd is running..."
+echo "Using ldapsearch to check that consumer slapd is running..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT2 \
'objectclass=*' > /dev/null 2>&1
exit $RC
fi
-echo "Using ldapadd to populate the master directory..."
+echo "Using ldapadd to populate the producer directory..."
$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD < \
$LDIFORDEREDNOCP > /dev/null 2>&1
RC=$?
echo "Waiting 15 seconds for syncrepl to receive changes..."
sleep 15
-echo "Using ldapmodify to modify master directory..."
+echo "Using ldapmodify to modify producer directory..."
#
# Do some modifications
echo "Waiting 15 seconds for syncrepl to receive changes..."
sleep 15
-echo "Try updating the slave slapd..."
+echo "Try updating the consumer slapd..."
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT2 -w $PASSWD > \
$TESTOUT 2>&1 << EOMODS
dn: cn=James A Jones 1, ou=Alumni Association, ou=People, dc=example, dc=com
exit $RC
fi
-echo "Using ldapsearch to read all the entries from the master..."
+OPATTRS="entryUUID creatorsName createTimestamp modifiersName modifyTimestamp"
+
+echo "Using ldapsearch to read all the entries from the producer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- 'objectclass=*' > $MASTEROUT 2>&1
+ '(objectclass=*)' '*' $OPATTRS > $MASTEROUT 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at master ($RC)!"
+ echo "ldapsearch failed at producer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-echo "Using ldapsearch to read all the entries from the slave..."
+echo "Using ldapsearch to read all the entries from the consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
- 'objectclass=*' > $SLAVEOUT 2>&1
+ '(objectclass=*)' '*' $OPATTRS > $SLAVEOUT 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at slave ($RC)!"
+ echo "ldapsearch failed at consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS
-echo "Filtering master results..."
+echo "Filtering producer results..."
. $LDIFFILTER < $MASTEROUT > $MASTERFLT
-echo "Filtering slave results..."
+echo "Filtering consumer results..."
. $LDIFFILTER < $SLAVEOUT > $SLAVEFLT
-echo "Comparing retrieved entries from master and slave..."
+echo "Comparing retrieved entries from producer and consumer..."
$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
if test $? != 0 ; then
- echo "test failed - master and slave databases differ"
+ echo "test failed - producer and consumer databases differ"
exit 1
fi
#
# Test replication:
-# - start master
-# - start slave
+# - start producer
+# - start consumer
# - populate over ldap
# - perform some modifies and deleted
-# - attempt to modify the slave (referral or chain)
+# - attempt to modify the consumer (referral or chain)
# - retrieve database over ldap and compare against expected results
#
-echo "Starting master slapd on TCP/IP port $PORT1..."
+echo "Starting producer slapd on TCP/IP port $PORT1..."
. $CONFFILTER $BACKEND $MONITORDB < $SRMASTERCONF > $CONF1
$SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING > $LOG1 2>&1 &
PID=$!
sleep 1
-echo "Using ldapsearch to check that master slapd is running..."
+echo "Using ldapsearch to check that producer slapd is running..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \
'objectclass=*' > /dev/null 2>&1
exit $RC
fi
-echo "Using ldapadd to create the context prefix entry in the master..."
+echo "Using ldapadd to create the context prefix entry in the producer..."
$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD < \
$LDIFORDEREDCP > /dev/null 2>&1
RC=$?
exit $RC
fi
-echo "Starting slave slapd on TCP/IP port $PORT4..."
+echo "Starting consumer slapd on TCP/IP port $PORT4..."
. $CONFFILTER $BACKEND $MONITORDB < $P1SRSLAVECONF > $CONF4
$SLAPD -f $CONF4 -h $URI4 -d $LVL $TIMING > $LOG4 2>&1 &
SLAVEPID=$!
sleep 1
-echo "Using ldapsearch to check that slave slapd is running..."
+echo "Using ldapsearch to check that consumer slapd is running..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT4 \
'objectclass=*' > /dev/null 2>&1
exit $RC
fi
-echo "Using ldapadd to populate the master directory..."
+echo "Using ldapadd to populate the producer directory..."
$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD < \
$LDIFORDEREDNOCP > /dev/null 2>&1
RC=$?
sleep 1
-echo "Using ldapsearch to check that master slapd is running..."
+echo "Using ldapsearch to check that producer slapd is running..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \
'objectclass=*' > /dev/null 2>&1
exit $RC
fi
-echo "Using ldapmodify to modify master directory..."
+echo "Using ldapmodify to modify producer directory..."
#
# Do some modifications
kill -HUP $SLAVEPID
wait $SLAVEPID
-echo "Modifying more entries on the master..."
+echo "Modifying more entries on the producer..."
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD >> \
$TESTOUT 2>&1 << EOMODS
dn: cn=Rosco P. Coltrane, ou=Retired, ou=People, dc=example,dc=com
sleep 25
if test ! $BACKLDAP = "ldapno" ; then
- echo "Try updating the slave slapd..."
+ echo "Try updating the consumer slapd..."
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT4 -w $PASSWD > \
$TESTOUT 2>&1 << EOMODS
dn: cn=James A Jones 1, ou=Alumni Association, ou=People, dc=example, dc=com
sleep 15
fi
-echo "Using ldapsearch to read all the entries from the master..."
+OPATTRS="entryUUID creatorsName createTimestamp modifiersName modifyTimestamp"
+
+echo "Using ldapsearch to read all the entries from the producer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- 'objectclass=*' > $MASTEROUT 2>&1
+ '(objectclass=*)' '*' $OPATTRS > $MASTEROUT 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at master ($RC)!"
+ echo "ldapsearch failed at producer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-echo "Using ldapsearch to read all the entries from the slave..."
+echo "Using ldapsearch to read all the entries from the consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT4 \
- 'objectclass=*' > $SLAVEOUT 2>&1
+ '(objectclass=*)' '*' $OPATTRS > $SLAVEOUT 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at slave ($RC)!"
+ echo "ldapsearch failed at consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS
-echo "Filtering master results..."
+echo "Filtering producer results..."
. $LDIFFILTER < $MASTEROUT > $MASTERFLT
-echo "Filtering slave results..."
+echo "Filtering consumer results..."
. $LDIFFILTER < $SLAVEOUT > $SLAVEFLT
-echo "Comparing retrieved entries from master and slave..."
+echo "Comparing retrieved entries from producer and consumer..."
$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
if test $? != 0 ; then
- echo "test failed - master and slave databases differ"
+ echo "test failed - producer and consumer databases differ"
exit 1
fi