3 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 ## Copyright 2004-2015 The OpenLDAP Foundation.
6 ## All rights reserved.
8 ## Redistribution and use in source and binary forms, with or without
9 ## modification, are permitted only as authorized by the OpenLDAP
12 ## A copy of this license is available in the file LICENSE in the
13 ## top-level directory of the distribution or, alternatively, at
14 ## <http://www.OpenLDAP.org/license.html>.
16 echo "running defines.sh"
17 . $SRCDIR/scripts/defines.sh
19 if test $UNIQUE = uniqueno; then
20 echo "Attribute Uniqueness overlay not available, test skipped"
25 test $BACKEND = null && RCODEconstraint=0
27 mkdir -p $TESTDIR $DBDIR1
29 $SLAPPASSWD -g -n >$CONFIGPWF
30 echo "rootpw `$SLAPPASSWD -T $CONFIGPWF`" >$TESTDIR/configpw.conf
32 echo "Running slapadd to build slapd database..."
33 . $CONFFILTER $BACKEND $MONITORDB < $UNIQUECONF > $CONF1
34 $SLAPADD -f $CONF1 -l $LDIFUNIQUE
36 if test $RC != 0 ; then
37 echo "slapadd failed ($RC)!"
41 echo "Starting slapd on TCP/IP port $PORT1..."
42 mkdir $TESTDIR/confdir
43 $SLAPD -f $CONF1 -F $TESTDIR/confdir -h $URI1 -d $LVL $TIMING > $LOG1 2>&1 &
45 if test $WAIT != 0 ; then
53 echo "Testing slapd attribute uniqueness operations..."
54 for i in 0 1 2 3 4 5; do
55 $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \
56 'objectclass=*' > /dev/null 2>&1
58 if test $RC = 0 ; then
61 echo "Waiting 5 seconds for slapd to start..."
65 if test $RC != 0 ; then
66 echo "ldapsearch failed ($RC)!"
67 test $KILLSERVERS != no && kill -HUP $KILLPIDS
71 echo "Adding a unique record..."
72 $LDAPADD -D "$UNIQUEDN" -h $LOCALHOST -p $PORT1 -w $PASSWD \
73 > /dev/null << EOTUNIQ1
74 dn: uid=dave,ou=users,o=unique
75 objectClass: inetOrgPerson
76 objectClass: simpleSecurityObject
80 businessCategory: otest
83 # NOTE: use special chars in attr value to be used
84 # in internal searches ITS#4212
85 displayName: Dave (ITS#4212)
87 employeeType: contractor
92 if test $RC != 0 ; then
93 echo "ldapadd failed ($RC)!"
94 test $KILLSERVERS != no && kill -HUP $KILLPIDS
98 echo "Adding a non-unique record..."
99 $LDAPADD -D "uid=dave,ou=users,o=unique" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
100 $TESTOUT 2>&1 << EOTUNIQ2
101 dn: uid=bill,ou=users,o=unique
102 objectClass: inetOrgPerson
106 businessCategory: rtest
111 employeeType: contractor
115 if test $RC != $RCODEconstraint ; then
116 echo "unique check failed ($RC)!"
117 test $KILLSERVERS != no && kill -HUP $KILLPIDS
122 echo "Trying to bypass uniqueness as a normal user..."
123 $LDAPADD -M -D "uid=dave,ou=users,o=unique" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
124 $TESTOUT 2>&1 << EOTUNIQ2
125 dn: uid=bill,ou=users,o=unique
126 objectClass: inetOrgPerson
130 businessCategory: rtest
135 employeeType: contractor
139 if test $RC != $RCODEconstraint ; then
140 echo "unique check failed ($RC)!"
141 test $KILLSERVERS != no && kill -HUP $KILLPIDS
146 echo "Bypassing uniqueness as an admin user..."
147 $LDAPADD -M -D "$UNIQUEDN" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
148 $TESTOUT 2>&1 << EOTUNIQ2
149 dn: uid=bill,ou=users,o=unique
150 objectClass: inetOrgPerson
154 businessCategory: rtest
159 employeeType: contractor
163 if test $RC != 0 ; then
164 echo "spurious unique error ($RC)!"
165 test $KILLSERVERS != no && kill -HUP $KILLPIDS
170 $LDAPDELETE -D "$UNIQUEDN" -h $LOCALHOST -p $PORT1 -w $PASSWD \
171 "uid=bill,ou=users,o=unique" > $TESTOUT 2>&1
173 if test $RC != 0; then
174 echo "ldapdelete failed ($RC)!"
175 test $KILLSERVERS != no && kill -HUP $KILLPIDS
179 echo Dynamically retrieving initial configuration...
180 $LDAPSEARCH -S "" -b olcOverlay='{0}'unique,olcDatabase='{1}'$BACKEND,cn=config -D cn=config -y $CONFIGPWF -h $LOCALHOST -p $PORT1 -LLL | tr -d \\r >$TESTDIR/initial-config.ldif
181 cat <<EOF >$TESTDIR/initial-reference.ldif
182 dn: olcOverlay={0}unique,olcDatabase={1}$BACKEND,cn=config
183 objectClass: olcOverlayConfig
184 objectClass: olcUniqueConfig
185 olcOverlay: {0}unique
186 olcUniqueBase: o=unique
187 olcUniqueAttribute: employeeNumber
188 olcUniqueAttribute: displayName
191 diff $TESTDIR/initial-config.ldif $TESTDIR/initial-reference.ldif > /dev/null 2>&1
193 if test $RC != 0 ; then
194 echo "Initial configuration is not reported correctly."
195 test $KILLSERVERS != no && kill -HUP $KILLPIDS
199 echo Dynamically trying to add a URI with legacy attrs present...
200 $LDAPMODIFY -D cn=config -h $LOCALHOST -p $PORT1 -y $CONFIGPWF \
201 > $TESTOUT 2>&1 <<EOF
202 dn: olcOverlay={0}unique,olcDatabase={1}$BACKEND,cn=config
205 olcUniqueURI: ldap:///?employeeNumber,displayName?sub
208 if test $RC != 80 ; then
209 echo "legacy and unique_uri allowed together"
210 test $KILLSERVERS != no && kill -HUP $KILLPIDS
214 echo Dynamically trying to add legacy ignored attrs with legacy attrs present...
215 $LDAPMODIFY -D cn=config -h $LOCALHOST -p $PORT1 -y $CONFIGPWF \
216 > $TESTOUT 2>&1 <<EOF
217 dn: olcOverlay={0}unique,olcDatabase={1}$BACKEND,cn=config
220 olcUniqueIgnore: objectClass
223 if test $RC != 80 ; then
224 echo "legacy attrs and legacy ignore attrs allowed together"
225 test $KILLSERVERS != no && kill -HUP $KILLPIDS
229 echo Verifying initial configuration intact...
230 $LDAPSEARCH -S "" -b olcOverlay='{0}'unique,olcDatabase='{1}'$BACKEND,cn=config -D cn=config -y $CONFIGPWF -h $LOCALHOST -p $PORT1 -LLL | tr -d \\r >$TESTDIR/initial-config-recheck.ldif
231 diff $TESTDIR/initial-config-recheck.ldif $TESTDIR/initial-reference.ldif > /dev/null 2>&1
233 if test $RC != 0 ; then
234 echo "Initial configuration damaged by unsuccessful modifies."
235 test $KILLSERVERS != no && kill -HUP $KILLPIDS
239 echo Dynamically removing legacy base...
240 $LDAPMODIFY -D cn=config -h $LOCALHOST -p $PORT1 -y $CONFIGPWF \
241 > $TESTOUT 2>&1 <<EOF
242 dn: olcOverlay={0}unique,olcDatabase={1}$BACKEND,cn=config
244 delete: olcUniqueBase
247 if test $RC != 0 ; then
248 echo "base removal failed"
249 test $KILLSERVERS != no && kill -HUP $KILLPIDS
253 echo Verifying base removal...
254 $LDAPSEARCH -S "" -b olcOverlay='{0}'unique,olcDatabase='{1}'$BACKEND,cn=config -D cn=config -y $CONFIGPWF -h $LOCALHOST -p $PORT1 -LLL | tr -d \\r >$TESTDIR/baseremoval-config.ldif
255 cat >$TESTDIR/baseremoval-reference.ldif <<EOF
256 dn: olcOverlay={0}unique,olcDatabase={1}$BACKEND,cn=config
257 objectClass: olcOverlayConfig
258 objectClass: olcUniqueConfig
259 olcOverlay: {0}unique
260 olcUniqueAttribute: employeeNumber
261 olcUniqueAttribute: displayName
264 diff $TESTDIR/baseremoval-config.ldif $TESTDIR/baseremoval-reference.ldif > /dev/null 2>&1
266 if test $RC != 0 ; then
267 echo "Configuration damaged by base removal"
268 test $KILLSERVERS != no && kill -HUP $KILLPIDS
272 echo "Adding a non-unique record..."
273 $LDAPADD -D "uid=dave,ou=users,o=unique" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
274 $TESTOUT 2>&1 << EOTUNIQ2
275 dn: uid=bill,ou=users,o=unique
276 objectClass: inetOrgPerson
280 businessCategory: rtest
285 employeeType: contractor
289 if test $RC != $RCODEconstraint ; then
290 echo "unique check failed ($RC)!"
291 test $KILLSERVERS != no && kill -HUP $KILLPIDS
295 echo Trying a legacy base outside of the backend...
296 $LDAPMODIFY -D cn=config -h $LOCALHOST -p $PORT1 -y $CONFIGPWF \
297 > $TESTOUT 2>&1 <<EOF
298 dn: olcOverlay={0}unique,olcDatabase={1}$BACKEND,cn=config
301 olcUniqueBase: cn=config
304 if test $RC != 80 ; then
305 echo "out of backend scope base allowed"
306 test $KILLSERVERS != no && kill -HUP $KILLPIDS
310 echo "Adding and removing attrs..."
311 $LDAPMODIFY -D cn=config -h $LOCALHOST -p $PORT1 -y $CONFIGPWF \
312 > $TESTOUT 2>&1 <<EOF
313 dn: olcOverlay={0}unique,olcDatabase={1}$BACKEND,cn=config
315 add: olcUniqueAttribute
316 olcUniqueAttribute: description
317 olcUniqueAttribute: telephoneNumber
319 delete: olcUniqueAttribute
320 olcUniqueAttribute: displayName
323 if test $RC != 0 ; then
324 echo "Unable to remove an attribute"
325 test $KILLSERVERS != no && kill -HUP $KILLPIDS
329 echo "Verifying we removed the right attr..."
330 $LDAPADD -D "uid=dave,ou=users,o=unique" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
331 $TESTOUT 2>&1 << EOTUNIQ2
332 dn: uid=bill,ou=users,o=unique
333 objectClass: inetOrgPerson
337 businessCategory: rtest
342 employeeType: contractor
346 if test $RC != $RCODEconstraint ; then
347 echo "olcUniqueAttribtue single deletion hit the wrong value"
348 test $KILLSERVERS != no && kill -HUP $KILLPIDS
352 echo Removing legacy config and adding URIs...
353 $LDAPMODIFY -D cn=config -h $LOCALHOST -p $PORT1 -y $CONFIGPWF \
354 > $TESTOUT 2>&1 <<EOF
355 dn: olcOverlay={0}unique,olcDatabase={1}$BACKEND,cn=config
357 delete: olcUniqueAttribute
360 olcUniqueURI: ldap:///?employeeNumber,displayName?sub
361 olcUniqueURI: ldap:///?description?one
364 if test $RC != 0 ; then
365 echo "Reconfiguration to URIs failed"
366 test $KILLSERVERS != no && kill -HUP $KILLPIDS
370 echo Dynamically retrieving second configuration...
371 $LDAPSEARCH -S "" -b olcOverlay='{0}'unique,olcDatabase='{1}'$BACKEND,cn=config -D cn=config -y $CONFIGPWF -h $LOCALHOST -p $PORT1 -LLL | tr -d \\r >$TESTDIR/second-config.ldif
372 cat >$TESTDIR/second-reference.ldif <<EOF
373 dn: olcOverlay={0}unique,olcDatabase={1}$BACKEND,cn=config
374 objectClass: olcOverlayConfig
375 objectClass: olcUniqueConfig
376 olcOverlay: {0}unique
377 olcUniqueURI: ldap:///?employeeNumber,displayName?sub
378 olcUniqueURI: ldap:///?description?one
381 diff $TESTDIR/second-config.ldif $TESTDIR/second-reference.ldif > /dev/null 2>&1
383 if test $RC != 0 ; then
384 echo "Second configuration is not reported correctly."
385 test $KILLSERVERS != no && kill -HUP $KILLPIDS
389 echo "Adding a non-unique record..."
390 $LDAPADD -D "uid=dave,ou=users,o=unique" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
391 $TESTOUT 2>&1 << EOTUNIQ2
392 dn: uid=bill,ou=users,o=unique
393 objectClass: inetOrgPerson
397 businessCategory: rtest
402 employeeType: contractor
406 if test $RC != $RCODEconstraint ; then
407 echo "unique check failed ($RC)!"
408 test $KILLSERVERS != no && kill -HUP $KILLPIDS
412 echo Dynamically trying to add legacy base
413 $LDAPMODIFY -D cn=config -h $LOCALHOST -p $PORT1 -y $CONFIGPWF \
414 > $TESTOUT 2>&1 <<EOF
415 dn: olcOverlay={0}unique,olcDatabase={1}$BACKEND,cn=config
418 olcUniqueBase: o=unique
421 if test $RC != 80 ; then
422 echo "legacy base allowed with URIs"
423 test $KILLSERVERS != no && kill -HUP $KILLPIDS
427 echo Dynamically trying to add legacy attrs
428 $LDAPMODIFY -D cn=config -h $LOCALHOST -p $PORT1 -y $CONFIGPWF \
429 > $TESTOUT 2>&1 <<EOF
430 dn: olcOverlay={0}unique,olcDatabase={1}$BACKEND,cn=config
432 add: olcUniqueAttribute
433 olcUniqueAttribute: description
436 if test $RC != 80 ; then
437 echo "legacy attributes allowed with URIs"
438 test $KILLSERVERS != no && kill -HUP $KILLPIDS
442 echo Dynamically trying to add legacy strictness
443 $LDAPMODIFY -D cn=config -h $LOCALHOST -p $PORT1 -y $CONFIGPWF \
444 > $TESTOUT 2>&1 <<EOF
445 dn: olcOverlay={0}unique,olcDatabase={1}$BACKEND,cn=config
448 olcUniqueStrict: TRUE
451 if test $RC != 80 ; then
452 echo "legacy strictness allowed with URIs"
453 test $KILLSERVERS != no && kill -HUP $KILLPIDS
457 #echo ----------------------
458 echo Dynamically trying a bad filter...
459 $LDAPMODIFY -D cn=config -h $LOCALHOST -p $PORT1 -y $CONFIGPWF \
460 > $TESTOUT 2>&1 <<EOF
461 dn: olcOverlay={0}unique,olcDatabase={1}$BACKEND,cn=config
463 replace: olcUniqueURI
464 olcUniqueURI: ldap:///?sn?sub?((cn=e*))
467 if test $RC != 80 ; then
468 echo "bad filter allowed"
469 test $KILLSERVERS != no && kill -HUP $KILLPIDS
473 echo Verifying second configuration intact...
474 $LDAPSEARCH -S "" -b olcOverlay='{0}'unique,olcDatabase='{1}'$BACKEND,cn=config -D cn=config -y $CONFIGPWF -h $LOCALHOST -p $PORT1 -LLL | tr -d \\r >$TESTDIR/second-config-recheck.ldif
475 diff $TESTDIR/second-config-recheck.ldif $TESTDIR/second-reference.ldif > /dev/null 2>&1
477 if test $RC != 0 ; then
478 echo "Second configuration damaged by rejected modifies."
479 test $KILLSERVERS != no && kill -HUP $KILLPIDS
483 #echo ----------------------
484 echo Dynamically reconfiguring to use different URIs...
485 $LDAPMODIFY -D cn=config -h $LOCALHOST -p $PORT1 -y $CONFIGPWF \
486 > $TESTOUT 2>&1 <<EOF
487 dn: olcOverlay={0}unique,olcDatabase={1}$BACKEND,cn=config
490 olcUniqueURI: ldap:///?sn?sub?(cn=e*)
491 olcUniqueURI: ldap:///?uid?sub?(cn=edgar)
494 olcUniqueURI: ldap:///?description?one
497 if test $RC != 0 ; then
498 echo "unable to reconfigure"
499 test $KILLSERVERS != no && kill -HUP $KILLPIDS
503 echo Dynamically retrieving third configuration...
504 $LDAPSEARCH -S "" -b olcOverlay='{0}'unique,olcDatabase='{1}'$BACKEND,cn=config -D cn=config -y $CONFIGPWF -h $LOCALHOST -p $PORT1 -LLL | tr -d \\r >$TESTDIR/third-config.ldif
505 cat >$TESTDIR/third-reference.ldif <<EOF
506 dn: olcOverlay={0}unique,olcDatabase={1}$BACKEND,cn=config
507 objectClass: olcOverlayConfig
508 objectClass: olcUniqueConfig
509 olcOverlay: {0}unique
510 olcUniqueURI: ldap:///?employeeNumber,displayName?sub
511 olcUniqueURI: ldap:///?sn?sub?(cn=e*)
512 olcUniqueURI: ldap:///?uid?sub?(cn=edgar)
515 diff $TESTDIR/third-config.ldif $TESTDIR/third-reference.ldif > /dev/null 2>&1
517 if test $RC != 0 ; then
518 echo "Third configuration is not reported correctly."
519 test $KILLSERVERS != no && kill -HUP $KILLPIDS
523 echo "Adding a record unique in both domains if filtered..."
525 $LDAPADD -D "$UNIQUEDN" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
527 dn: uid=edgar,ou=users,o=unique
528 objectClass: inetOrgPerson
535 if test $RC != 0 ; then
536 echo "unique check failed ($RC)!"
537 test $KILLSERVERS != no && kill -HUP $KILLPIDS
541 echo "Adding a record unique in all domains because of filter conditions "
542 $LDAPADD -D "$UNIQUEDN" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
544 dn: uid=empty,ou=users,o=unique
545 objectClass: inetOrgPerson
552 if test $RC != 0 ; then
553 echo "spurious unique error ($RC)!"
554 test $KILLSERVERS != no && kill -HUP $KILLPIDS
558 echo "Making a record non-unique"
559 $LDAPMODIFY -D "uid=dave,ou=users,o=unique" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
561 dn: uid=empty,ou=users,o=unique
568 if test $RC != $RCODEconstraint ; then
569 echo "unique check failed ($RC)!"
570 test $KILLSERVERS != no && kill -HUP $KILLPIDS
575 echo "Trying to bypass uniqueness as a normal user..."
576 $LDAPMODIFY -M -D "uid=dave,ou=users,o=unique" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
578 dn: uid=empty,ou=users,o=unique
585 if test $RC != $RCODEconstraint ; then
586 echo "unique check failed ($RC)!"
587 test $KILLSERVERS != no && kill -HUP $KILLPIDS
592 echo "Bypassing uniqueness as an admin user..."
593 $LDAPMODIFY -M -D "$UNIQUEDN" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
595 dn: uid=empty,ou=users,o=unique
602 if test $RC != 0 ; then
603 echo "spurious unique error ($RC)!"
604 test $KILLSERVERS != no && kill -HUP $KILLPIDS
609 $LDAPMODIFY -D "$UNIQUEDN" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
611 dn: uid=empty,ou=users,o=unique
618 if test $RC != 0; then
619 echo "ldapmodify failed ($RC)!"
620 test $KILLSERVERS != no && kill -HUP $KILLPIDS
624 echo "Adding another unique record..."
625 $LDAPADD -D "$UNIQUEDN" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
627 dn: uid=not edgar,uid=edgar,ou=users,o=unique
628 objectClass: inetOrgPerson
635 if test $RC != 0 ; then
636 echo "unique check failed ($RC)!"
637 test $KILLSERVERS != no && kill -HUP $KILLPIDS
641 echo "Making the record non-unique with modrdn..."
642 $LDAPMODRDN -D "uid=dave,ou=users,o=unique" -h $LOCALHOST -p $PORT1 -w $PASSWD \
643 "uid=not edgar,uid=edgar,ou=users,o=unique" "uid=edgar" > $TESTOUT 2>&1
646 if test $RC != $RCODEconstraint ; then
647 echo "unique check failed ($RC)!"
648 test $KILLSERVERS != no && kill -HUP $KILLPIDS
653 echo "Trying to bypass uniqueness as a normal user..."
654 $LDAPMODRDN -M -D "uid=dave,ou=users,o=unique" -h $LOCALHOST -p $PORT1 -w $PASSWD \
655 "uid=not edgar,uid=edgar,ou=users,o=unique" "uid=edgar" > $TESTOUT 2>&1
658 if test $RC != $RCODEconstraint ; then
659 echo "unique check failed ($RC)!"
660 test $KILLSERVERS != no && kill -HUP $KILLPIDS
665 echo "Bypassing uniqueness as an admin user..."
666 $LDAPMODRDN -M -D "$UNIQUEDN" -h $LOCALHOST -p $PORT1 -w $PASSWD \
667 "uid=not edgar,uid=edgar,ou=users,o=unique" "uid=edgar" > $TESTOUT 2>&1
670 if test $RC != 0 ; then
671 echo "spurious unique error ($RC)!"
672 test $KILLSERVERS != no && kill -HUP $KILLPIDS
677 $LDAPDELETE -D "$UNIQUEDN" -h $LOCALHOST -p $PORT1 -w $PASSWD \
678 "uid=edgar,uid=edgar,ou=users,o=unique" > $TESTOUT 2>&1
680 if test $RC != 0; then
681 echo "ldapdelete failed ($RC)!"
682 test $KILLSERVERS != no && kill -HUP $KILLPIDS
686 echo "Adding a record unique in one domain, non-unique in the filtered domain..."
688 $LDAPADD -D "uid=dave,ou=users,o=unique" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
690 dn: uid=elvis,ou=users,o=unique
691 objectClass: inetOrgPerson
698 if test $RC != $RCODEconstraint ; then
699 echo "unique check failed ($RC)!"
700 test $KILLSERVERS != no && kill -HUP $KILLPIDS
704 #echo ----------------------
705 echo Dynamically reconfiguring to use attribute-ignore URIs...
706 $LDAPMODIFY -D cn=config -h $LOCALHOST -p $PORT1 -y $CONFIGPWF \
707 > $TESTOUT 2>&1 <<EOF
708 dn: olcOverlay={0}unique,olcDatabase={1}$BACKEND,cn=config
710 replace: olcUniqueURI
711 olcUniqueURI: ignore ldap:///?objectClass,uid,cn,sn?sub
714 if test $RC != 0 ; then
715 echo "unable to reconfigure"
716 test $KILLSERVERS != no && kill -HUP $KILLPIDS
720 echo Dynamically retrieving fourth configuration...
721 $LDAPSEARCH -S "" -b olcOverlay='{0}'unique,olcDatabase='{1}'$BACKEND,cn=config -D cn=config -y $CONFIGPWF -h $LOCALHOST -p $PORT1 -LLL | tr -d \\r >$TESTDIR/fourth-config.ldif
722 cat >$TESTDIR/fourth-reference.ldif <<EOF
723 dn: olcOverlay={0}unique,olcDatabase={1}$BACKEND,cn=config
724 objectClass: olcOverlayConfig
725 objectClass: olcUniqueConfig
726 olcOverlay: {0}unique
727 olcUniqueURI: ignore ldap:///?objectClass,uid,cn,sn?sub
730 diff $TESTDIR/fourth-config.ldif $TESTDIR/fourth-reference.ldif > /dev/null 2>&1
732 if test $RC != 0 ; then
733 echo "Fourth configuration is not reported correctly."
734 test $KILLSERVERS != no && kill -HUP $KILLPIDS
738 echo "Adding a record unique in the ignore-domain..."
740 $LDAPADD -D "$UNIQUEDN" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
742 dn: uid=elvis,ou=users,o=unique
743 objectClass: inetOrgPerson
747 description: left the building
751 if test $RC != 0 ; then
752 echo "unique check failed ($RC)!"
753 test $KILLSERVERS != no && kill -HUP $KILLPIDS
757 echo "Adding a record non-unique in the ignore-domain..."
759 $LDAPADD -D "uid=dave,ou=users,o=unique" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
761 dn: uid=harry,ou=users,o=unique
762 objectClass: inetOrgPerson
766 description: left the building
770 if test $RC != $RCODEconstraint ; then
771 echo "unique check failed ($RC)!"
772 test $KILLSERVERS != no && kill -HUP $KILLPIDS
776 test $KILLSERVERS != no && kill -HUP $KILLPIDS
778 echo ">>>>> Test succeeded"
780 test $KILLSERVERS != no && wait