Home | History | Annotate | Line # | Download | only in scripts
      1 #! /bin/sh
      2 ## $OpenLDAP$
      3 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
      4 ##
      5 ## Copyright 2016-2024 The OpenLDAP Foundation.
      6 ## All rights reserved.
      7 ##
      8 ## Redistribution and use in source and binary forms, with or without
      9 ## modification, are permitted only as authorized by the OpenLDAP
     10 ## Public License.
     11 ##
     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>.
     15 ##
     16 ## ACKNOWLEDGEMENTS:
     17 ## This module was written in 2016 by Ondej Kuznk for Symas Corp.
     18 
     19 echo "running defines.sh"
     20 . $SRCDIR/scripts/defines.sh
     21 
     22 . ${SCRIPTDIR}/common.sh
     23 
     24 echo "Renaming an entry to add new value (should fail)..."
     25 $LDAPMODRDN -D $MANAGERDN -H $URI1 -w $PASSWD \
     26 	"cn=Mark Elliot,ou=Alumni Association,ou=People,$BASEDN" \
     27 	"cn=Mark Elliot+enumerated=melliot" \
     28 	>> $TESTOUT 2>&1
     29 RC=$?
     30 case $RC in
     31 0)
     32 	echo "ldapmodrdn should have failed ($RC)!"
     33 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
     34 	exit 1
     35 	;;
     36 19)
     37 	echo "ldapmodrdn failed ($RC)"
     38 	;;
     39 *)
     40 	echo "ldapmodrdn failed ($RC)!"
     41 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
     42 	exit $RC
     43 	;;
     44 esac
     45 
     46 test $KILLSERVERS != no && kill -HUP $KILLPIDS
     47 
     48 echo ">>>>> Test succeeded"
     49 
     50 test $KILLSERVERS != no && wait
     51 
     52 exit 0
     53