4404fd
From 8e3e85e329f5cbd989936b0df8a0ac06906a4824 Mon Sep 17 00:00:00 2001
4404fd
From: Isaac Boukris <iboukris@gmail.com>
4404fd
Date: Tue, 14 Apr 2020 16:19:05 +0300
4404fd
Subject: [PATCH] auth: add SASL/GSSAPI tests
4404fd
4404fd
---
4404fd
 tests/data/krb5.conf              |  32 ++++++
4404fd
 tests/data/slapd-sasl-gssapi.conf |  65 ++++++++++++
4404fd
 tests/scripts/conf.sh             |   3 +
4404fd
 tests/scripts/defines.sh          |   5 +
4404fd
 tests/scripts/setup_kdc.sh        | 144 +++++++++++++++++++++++++++
4404fd
 tests/scripts/test077-sasl-gssapi | 159 ++++++++++++++++++++++++++++++
4404fd
 6 files changed, 408 insertions(+)
4404fd
 create mode 100644 tests/data/krb5.conf
4404fd
 create mode 100644 tests/data/slapd-sasl-gssapi.conf
4404fd
 create mode 100755 tests/scripts/setup_kdc.sh
4404fd
 create mode 100755 tests/scripts/test077-sasl-gssapi
4404fd
4404fd
diff --git a/tests/data/krb5.conf b/tests/data/krb5.conf
4404fd
new file mode 100644
4404fd
index 000000000..739113742
4404fd
--- /dev/null
4404fd
+++ b/tests/data/krb5.conf
4404fd
@@ -0,0 +1,32 @@
4404fd
+[libdefaults]
4404fd
+  default_realm = @KRB5REALM@
4404fd
+  dns_lookup_realm = false
4404fd
+  dns_lookup_kdc = false
4404fd
+  default_ccache_name = FILE://@TESTDIR@/ccache
4404fd
+  #udp_preference_limit = 1
4404fd
+[realms]
4404fd
+ @KRB5REALM@ = {
4404fd
+  kdc = @KDCHOST@:@KDCPORT@
4404fd
+  acl_file = @TESTDIR@/kadm.acl
4404fd
+  database_name = @TESTDIR@/kdc.db
4404fd
+  key_stash_file = @TESTDIR@/kdc.stash
4404fd
+ }
4404fd
+[kdcdefaults]
4404fd
+  kdc_ports = @KDCPORT@
4404fd
+  kdc_tcp_ports = @KDCPORT@
4404fd
+[logging]
4404fd
+  kdc = FILE:@TESTDIR@/kdc.log
4404fd
+  admin_server = FILE:@TESTDIR@/kadm.log
4404fd
+  default = FILE:@TESTDIR@/krb5.log
4404fd
+
4404fd
+#Heimdal
4404fd
+[kdc]
4404fd
+ database = {
4404fd
+  dbname = @TESTDIR@/kdc.db
4404fd
+  realm = @KRB5REALM@
4404fd
+  mkey_file = @TESTDIR@/kdc.stash
4404fd
+  log_file = @TESTDIR@/kdc.log
4404fd
+  acl_file = @TESTDIR@/kadm.acl
4404fd
+ }
4404fd
+[hdb]
4404fd
+  db-dir = @TESTDIR@
4404fd
diff --git a/tests/data/slapd-sasl-gssapi.conf b/tests/data/slapd-sasl-gssapi.conf
4404fd
new file mode 100644
4404fd
index 000000000..611fc7097
4404fd
--- /dev/null
4404fd
+++ b/tests/data/slapd-sasl-gssapi.conf
4404fd
@@ -0,0 +1,65 @@
4404fd
+# stand-alone slapd config -- for testing (with indexing)
4404fd
+# $OpenLDAP$
4404fd
+## This work is part of OpenLDAP Software <http://www.openldap.org/>.
4404fd
+##
4404fd
+## Copyright 1998-2020 The OpenLDAP Foundation.
4404fd
+## All rights reserved.
4404fd
+##
4404fd
+## Redistribution and use in source and binary forms, with or without
4404fd
+## modification, are permitted only as authorized by the OpenLDAP
4404fd
+## Public License.
4404fd
+##
4404fd
+## A copy of this license is available in the file LICENSE in the
4404fd
+## top-level directory of the distribution or, alternatively, at
4404fd
+## <http://www.OpenLDAP.org/license.html>.
4404fd
+
4404fd
+#
4404fd
+include		@SCHEMADIR@/core.schema
4404fd
+include		@SCHEMADIR@/cosine.schema
4404fd
+#
4404fd
+include		@SCHEMADIR@/corba.schema
4404fd
+include		@SCHEMADIR@/java.schema
4404fd
+include		@SCHEMADIR@/inetorgperson.schema
4404fd
+include		@SCHEMADIR@/misc.schema
4404fd
+include		@SCHEMADIR@/nis.schema
4404fd
+include		@SCHEMADIR@/openldap.schema
4404fd
+#
4404fd
+include		@SCHEMADIR@/duaconf.schema
4404fd
+include		@SCHEMADIR@/dyngroup.schema
4404fd
+
4404fd
+#
4404fd
+pidfile		@TESTDIR@/slapd.1.pid
4404fd
+argsfile	@TESTDIR@/slapd.1.args
4404fd
+
4404fd
+# SSL configuration
4404fd
+TLSCACertificateFile @TESTDIR@/tls/ca/certs/testsuiteCA.crt
4404fd
+TLSCertificateKeyFile @TESTDIR@/tls/private/localhost.key
4404fd
+TLSCertificateFile @TESTDIR@/tls/certs/localhost.crt
4404fd
+
4404fd
+#
4404fd
+rootdse 	@DATADIR@/rootdse.ldif
4404fd
+
4404fd
+#mod#modulepath	../servers/slapd/back-@BACKEND@/
4404fd
+#mod#moduleload	back_@BACKEND@.la
4404fd
+#monitormod#modulepath ../servers/slapd/back-monitor/
4404fd
+#monitormod#moduleload back_monitor.la
4404fd
+
4404fd
+
4404fd
+#######################################################################
4404fd
+# database definitions
4404fd
+#######################################################################
4404fd
+
4404fd
+database	@BACKEND@
4404fd
+suffix          "dc=example,dc=com"
4404fd
+rootdn          "cn=Manager,dc=example,dc=com"
4404fd
+rootpw          secret
4404fd
+#~null~#directory	@TESTDIR@/db.1.a
4404fd
+#indexdb#index		objectClass eq
4404fd
+#indexdb#index		mail eq
4404fd
+#ndb#dbname db_1_a
4404fd
+#ndb#include @DATADIR@/ndb.conf
4404fd
+
4404fd
+#monitor#database	monitor
4404fd
+
4404fd
+sasl-realm	@KRB5REALM@
4404fd
+sasl-host	localhost
4404fd
diff --git a/tests/scripts/conf.sh b/tests/scripts/conf.sh
4404fd
index b0393865d..c9e1a4b0a 100755
4404fd
--- a/tests/scripts/conf.sh
4404fd
+++ b/tests/scripts/conf.sh
4404fd
@@ -99,4 +99,7 @@ sed -e "s/@BACKEND@/${BACKEND}/"			\
4404fd
 	-e "s;@TESTWD@;${TESTWD};"			\
4404fd
 	-e "s;@DATADIR@;${DATADIR};"			\
4404fd
 	-e "s;@SCHEMADIR@;${SCHEMADIR};"		\
4404fd
+	-e "s;@KRB5REALM@;${KRB5REALM};"		\
4404fd
+	-e "s;@KDCHOST@;${KDCHOST};"			\
4404fd
+	-e "s;@KDCPORT@;${KDCPORT};"			\
4404fd
 	-e "/^#/d"
4404fd
diff --git a/tests/scripts/defines.sh b/tests/scripts/defines.sh
4404fd
index 1d6c2b3f1..ccb2e5b41 100755
4404fd
--- a/tests/scripts/defines.sh
4404fd
+++ b/tests/scripts/defines.sh
4404fd
@@ -114,6 +114,7 @@ REFSLAVECONF=$DATADIR/slapd-ref-slave.conf
4404fd
 SCHEMACONF=$DATADIR/slapd-schema.conf
4404fd
 TLSCONF=$DATADIR/slapd-tls.conf
4404fd
 TLSSASLCONF=$DATADIR/slapd-tls-sasl.conf
4404fd
+SASLGSSAPICONF=$DATADIR/slapd-sasl-gssapi.conf
4404fd
 GLUECONF=$DATADIR/slapd-glue.conf
4404fd
 REFINTCONF=$DATADIR/slapd-refint.conf
4404fd
 RETCODECONF=$DATADIR/slapd-retcode.conf
4404fd
@@ -223,6 +224,7 @@ PORT3=`expr $BASEPORT + 3`
4404fd
 PORT4=`expr $BASEPORT + 4`
4404fd
 PORT5=`expr $BASEPORT + 5`
4404fd
 PORT6=`expr $BASEPORT + 6`
4404fd
+KDCPORT=`expr $BASEPORT + 7`
4404fd
 URI1="ldap://${LOCALHOST}:$PORT1/"
4404fd
 URIP1="ldap://${LOCALIP}:$PORT1/"
4404fd
 URI2="ldap://${LOCALHOST}:$PORT2/"
4404fd
@@ -248,6 +250,9 @@ SURIP5="ldaps://${LOCALIP}:$PORT5/"
4404fd
 SURI6="ldaps://${LOCALHOST}:$PORT6/"
4404fd
 SURIP6="ldaps://${LOCALIP}:$PORT6/"
4404fd
 
4404fd
+KRB5REALM="K5.REALM"
4404fd
+KDCHOST=$LOCALHOST
4404fd
+
4404fd
 # LDIF
4404fd
 LDIF=$DATADIR/test.ldif
4404fd
 LDIFADD1=$DATADIR/do_add.1
4404fd
diff --git a/tests/scripts/setup_kdc.sh b/tests/scripts/setup_kdc.sh
4404fd
new file mode 100755
4404fd
index 000000000..1cb784075
4404fd
--- /dev/null
4404fd
+++ b/tests/scripts/setup_kdc.sh
4404fd
@@ -0,0 +1,144 @@
4404fd
+#! /bin/sh
4404fd
+# $OpenLDAP$
4404fd
+## This work is part of OpenLDAP Software <http://www.openldap.org/>.
4404fd
+##
4404fd
+## Copyright 1998-2020 The OpenLDAP Foundation.
4404fd
+## All rights reserved.
4404fd
+##
4404fd
+## Redistribution and use in source and binary forms, with or without
4404fd
+## modification, are permitted only as authorized by the OpenLDAP
4404fd
+## Public License.
4404fd
+##
4404fd
+## A copy of this license is available in the file LICENSE in the
4404fd
+## top-level directory of the distribution or, alternatively, at
4404fd
+## <http://www.OpenLDAP.org/license.html>.
4404fd
+
4404fd
+export KRB5_TRACE=$TESTDIR/k5_trace
4404fd
+export KRB5_CONFIG=$TESTDIR/krb5.conf
4404fd
+export KRB5_KDC_PROFILE=$KRB5_CONFIG
4404fd
+export KRB5_KTNAME=$TESTDIR/server.kt
4404fd
+export KRB5_CLIENT_KTNAME=$TESTDIR/client.kt
4404fd
+export KRB5CCNAME=$TESTDIR/client.ccache
4404fd
+
4404fd
+KDCLOG=$TESTDIR/setup_kdc.log
4404fd
+KSERVICE=ldap/$LOCALHOST
4404fd
+KUSER=kuser
4404fd
+
4404fd
+. $CONFFILTER < $DATADIR/krb5.conf > $KRB5_CONFIG
4404fd
+
4404fd
+PATH=${PATH}:/usr/lib/heimdal-servers:/usr/sbin:/usr/local/sbin
4404fd
+
4404fd
+echo "Trying Heimdal KDC..."
4404fd
+
4404fd
+kdc --version 2>&1 | grep Heimdal > $KDCLOG 2>&1
4404fd
+RC=$?
4404fd
+if test $RC = 0 ; then
4404fd
+
4404fd
+	kstash --random-key > $KDCLOG 2>&1
4404fd
+	RC=$?
4404fd
+	if test $RC != 0 ; then
4404fd
+		echo "Heimdal: kstash failed, skipping GSSAPI tests"
4404fd
+		exit 0
4404fd
+	fi
4404fd
+
4404fd
+	flags="--realm-max-ticket-life=1h --realm-max-renewable-life=1h"
4404fd
+	kadmin -l init $flags $KRB5REALM > $KDCLOG 2>&1
4404fd
+	RC=$?
4404fd
+	if test $RC != 0 ; then
4404fd
+		echo "Heimdal: kadmin init failed, skipping GSSAPI tests"
4404fd
+		exit 0
4404fd
+	fi
4404fd
+
4404fd
+	kadmin -l add --random-key --use-defaults $KSERVICE > $KDCLOG 2>&1
4404fd
+	RC=$?
4404fd
+	if test $RC != 0 ; then
4404fd
+		echo "Heimdal: kadmin add failed, skipping GSSAPI tests"
4404fd
+		exit 0
4404fd
+	fi
4404fd
+
4404fd
+	kadmin -l ext -k $KRB5_KTNAME $KSERVICE > $KDCLOG 2>&1
4404fd
+	RC=$?
4404fd
+	if test $RC != 0 ; then
4404fd
+		echo "Heimdal: kadmin ext failed, skipping GSSAPI tests"
4404fd
+		exit 0
4404fd
+	fi
4404fd
+
4404fd
+	kadmin -l add --random-key --use-defaults $KUSER > $KDCLOG 2>&1
4404fd
+	RC=$?
4404fd
+	if test $RC != 0 ; then
4404fd
+		echo "Heimdal: kadmin add failed, skipping GSSAPI tests"
4404fd
+		exit 0
4404fd
+	fi
4404fd
+
4404fd
+	kadmin -l ext -k $KRB5_CLIENT_KTNAME $KUSER > $KDCLOG 2>&1
4404fd
+	RC=$?
4404fd
+	if test $RC != 0 ; then
4404fd
+		echo "Heimdal: kadmin ext failed, skipping GSSAPI tests"
4404fd
+		exit 0
4404fd
+	fi
4404fd
+
4404fd
+	kdc --addresses=$LOCALIP --ports="$KDCPORT/udp" > $KDCLOG 2>&1 &
4404fd
+else
4404fd
+	echo "Trying MIT KDC..."
4404fd
+
4404fd
+	kdb5_util create -r $KRB5REALM -s -P password > $KDCLOG 2>&1
4404fd
+	RC=$?
4404fd
+	if test $RC != 0 ; then
4404fd
+		echo "MIT: kdb5_util create failed, skipping GSSAPI tests"
4404fd
+		exit 0
4404fd
+	fi
4404fd
+
4404fd
+	kadmin.local -q "addprinc -randkey $KSERVICE" > $KDCLOG 2>&1
4404fd
+	RC=$?
4404fd
+	if test $RC != 0 ; then
4404fd
+		echo "MIT: admin addprinc failed, skipping GSSAPI tests"
4404fd
+		exit 0
4404fd
+	fi
4404fd
+
4404fd
+	kadmin.local -q "ktadd -k $KRB5_KTNAME $KSERVICE" > $KDCLOG 2>&1
4404fd
+	RC=$?
4404fd
+	if test $RC != 0 ; then
4404fd
+		echo "MIT: kadmin ktadd failed, skipping GSSAPI tests"
4404fd
+		exit 0
4404fd
+	fi
4404fd
+
4404fd
+	kadmin.local -q "addprinc -randkey $KUSER" > $KDCLOG 2>&1
4404fd
+	RC=$?
4404fd
+	if test $RC != 0 ; then
4404fd
+		echo "MIT: kadmin addprinc failed, skipping GSSAPI tests"
4404fd
+		exit 0
4404fd
+	fi
4404fd
+
4404fd
+	kadmin.local -q "ktadd -k $KRB5_CLIENT_KTNAME $KUSER" > $KDCLOG 2>&1
4404fd
+	RC=$?
4404fd
+	if test $RC != 0 ; then
4404fd
+		echo "MIT: kadmin ktadd failed, skipping GSSAPI tests"
4404fd
+		exit 0
4404fd
+	fi
4404fd
+
4404fd
+	krb5kdc -n > $KDCLOG 2>&1 &
4404fd
+fi
4404fd
+
4404fd
+KDCPROC=$!
4404fd
+sleep 1
4404fd
+
4404fd
+kinit -kt $KRB5_CLIENT_KTNAME $KUSER > $KDCLOG 2>&1
4404fd
+RC=$?
4404fd
+if test $RC != 0 ; then
4404fd
+	kill $KDCPROC
4404fd
+	echo "SASL/GSSAPI: kinit failed, skipping GSSAPI tests"
4404fd
+	exit 0
4404fd
+fi
4404fd
+
4404fd
+pluginviewer -m GSSAPI > $TESTDIR/plugin_out 2>/dev/null
4404fd
+RC=$?
4404fd
+if test $RC != 0 ; then
4404fd
+
4404fd
+	saslpluginviewer -m GSSAPI > $TESTDIR/plugin_out 2>/dev/null
4404fd
+	RC=$?
4404fd
+	if test $RC != 0 ; then
4404fd
+		kill $KDCPROC
4404fd
+		echo "cyrus-sasl has no GSSAPI support, test skipped"
4404fd
+		exit 0
4404fd
+	fi
4404fd
+fi
4404fd
diff --git a/tests/scripts/test077-sasl-gssapi b/tests/scripts/test077-sasl-gssapi
4404fd
new file mode 100755
4404fd
index 000000000..64abe16fe
4404fd
--- /dev/null
4404fd
+++ b/tests/scripts/test077-sasl-gssapi
4404fd
@@ -0,0 +1,159 @@
4404fd
+#! /bin/sh
4404fd
+# $OpenLDAP$
4404fd
+## This work is part of OpenLDAP Software <http://www.openldap.org/>.
4404fd
+##
4404fd
+## Copyright 1998-2020 The OpenLDAP Foundation.
4404fd
+## All rights reserved.
4404fd
+##
4404fd
+## Redistribution and use in source and binary forms, with or without
4404fd
+## modification, are permitted only as authorized by the OpenLDAP
4404fd
+## Public License.
4404fd
+##
4404fd
+## A copy of this license is available in the file LICENSE in the
4404fd
+## top-level directory of the distribution or, alternatively, at
4404fd
+## <http://www.OpenLDAP.org/license.html>.
4404fd
+
4404fd
+echo "running defines.sh"
4404fd
+. $SRCDIR/scripts/defines.sh
4404fd
+
4404fd
+if test $WITH_SASL = no ; then
4404fd
+        echo "SASL support not available, test skipped"
4404fd
+        exit 0
4404fd
+fi
4404fd
+
4404fd
+mkdir -p $TESTDIR $DBDIR1
4404fd
+cp -r $DATADIR/tls $TESTDIR
4404fd
+
4404fd
+cd $TESTWD
4404fd
+
4404fd
+
4404fd
+echo "Starting KDC for SASL/GSSAPI tests..."
4404fd
+. $SRCDIR/scripts/setup_kdc.sh
4404fd
+
4404fd
+echo "Running slapadd to build slapd database..."
4404fd
+. $CONFFILTER $BACKEND $MONITORDB < $SASLGSSAPICONF > $CONF1
4404fd
+$SLAPADD -f $CONF1 -l $LDIFORDERED
4404fd
+RC=$?
4404fd
+if test $RC != 0 ; then
4404fd
+	echo "slapadd failed ($RC)!"
4404fd
+	kill $KDCPROC
4404fd
+	exit $RC
4404fd
+fi
4404fd
+
4404fd
+echo "Starting ldap:/// slapd on TCP/IP port $PORT1 and ldaps:/// slapd on $PORT2..."
4404fd
+$SLAPD -f $CONF1 -h "$URI1 $SURI2" -d $LVL $TIMING > $LOG1 2>&1 &
4404fd
+PID=$!
4404fd
+if test $WAIT != 0 ; then
4404fd
+    echo PID $PID
4404fd
+    read foo
4404fd
+fi
4404fd
+KILLPIDS="$PID"
4404fd
+
4404fd
+sleep 1
4404fd
+
4404fd
+for i in 0 1 2 3 4 5; do
4404fd
+	$LDAPSEARCH -s base -b "" -H $URI1 \
4404fd
+		'objectclass=*' > /dev/null 2>&1
4404fd
+        RC=$?
4404fd
+        if test $RC = 0 ; then
4404fd
+                break
4404fd
+        fi
4404fd
+        echo "Waiting 5 seconds for slapd to start..."
4404fd
+        sleep 5
4404fd
+done
4404fd
+
4404fd
+if test $RC != 0 ; then
4404fd
+	echo "ldapsearch failed ($RC)!"
4404fd
+	kill $KDCPROC
4404fd
+	test $KILLSERVERS != no && kill -HUP $KILLPIDS
4404fd
+	exit $RC
4404fd
+fi
4404fd
+
4404fd
+$LDAPSEARCH -x -H $URI1 -s "base" -b "" supportedSASLMechanisms > $TESTOUT 2>&1
4404fd
+RC=$?
4404fd
+if test $RC != 0 ; then
4404fd
+	echo "ldapsearch failed ($RC)!"
4404fd
+	kill $KDCPROC
4404fd
+	test $KILLSERVERS != no && kill -HUP $KILLPIDS
4404fd
+	exit $RC
4404fd
+fi
4404fd
+
4404fd
+grep GSSAPI $TESTOUT
4404fd
+RC=$?
4404fd
+if test $RC != 0 ; then
4404fd
+	echo "failed: GSSAPI mechanism not in supportedSASLMechanisms."
4404fd
+	kill $KDCPROC
4404fd
+	test $KILLSERVERS != no && kill -HUP $KILLPIDS
4404fd
+	exit $RC
4404fd
+fi
4404fd
+
4404fd
+echo -n "Using ldapwhoami with SASL/GSSAPI: "
4404fd
+$LDAPSASLWHOAMI -N -Y GSSAPI -H $URI1 > $TESTOUT 2>&1
4404fd
+RC=$?
4404fd
+if test $RC != 0 ; then
4404fd
+	echo "ldapwhoami failed ($RC)!"
4404fd
+	kill $KDCPROC
4404fd
+	test $KILLSERVERS != no && kill -HUP $KILLPIDS
4404fd
+	exit $RC
4404fd
+else
4404fd
+	echo "success"
4404fd
+fi
4404fd
+
4404fd
+echo -n "Validating mapped SASL/GSSAPI ID: "
4404fd
+echo "dn:uid=$KUSER,cn=$KRB5REALM,cn=gssapi,cn=auth" > $TESTDIR/dn.out
4404fd
+$CMP $TESTDIR/dn.out $TESTOUT > $CMPOUT
4404fd
+RC=$?
4404fd
+if test $RC != 0 ; then
4404fd
+	echo "Comparison failed"
4404fd
+	kill $KDCPROC
4404fd
+	test $KILLSERVERS != no && kill -HUP $KILLPIDS
4404fd
+	exit $RC
4404fd
+else
4404fd
+	echo "success"
4404fd
+fi
4404fd
+
4404fd
+if test $WITH_TLS = no ; then
4404fd
+        echo "SASL/GSSAPI: TLS support not available, skipping TLS part."
4404fd
+else
4404fd
+	echo -n "Using ldapwhoami with SASL/GSSAPI with start-tls: "
4404fd
+	$LDAPSASLWHOAMI -N -Y GSSAPI -H $URI1 -ZZ -o tls_reqcert=allow	\
4404fd
+		-o tls_cacert=$TESTDIR/tls/ca/certs/testsuiteCA.crt	\
4404fd
+		> $TESTOUT 2>&1
4404fd
+	RC=$?
4404fd
+	if test $RC != 0 ; then
4404fd
+		echo "ldapwhoami failed ($RC)!"
4404fd
+		kill $KDCPROC
4404fd
+		test $KILLSERVERS != no && kill -HUP $KILLPIDS
4404fd
+		exit $RC
4404fd
+	else
4404fd
+		echo "success"
4404fd
+	fi
4404fd
+
4404fd
+	echo -n "Using ldapwhoami with SASL/GSSAPI with ldaps: "
4404fd
+	$LDAPSASLWHOAMI -N -Y GSSAPI -H $SURI2 -o tls_reqcert=allow	\
4404fd
+		-o tls_cacert=$TESTDIR/tls/ca/certs/testsuiteCA.crt	\
4404fd
+		> $TESTOUT 2>&1
4404fd
+	RC=$?
4404fd
+	if test $RC != 0 ; then
4404fd
+		echo "ldapwhoami failed ($RC)!"
4404fd
+		kill $KDCPROC
4404fd
+		test $KILLSERVERS != no && kill -HUP $KILLPIDS
4404fd
+		exit $RC
4404fd
+	else
4404fd
+		echo "success"
4404fd
+	fi
4404fd
+fi
4404fd
+
4404fd
+kill $KDCPROC
4404fd
+test $KILLSERVERS != no && kill -HUP $KILLPIDS
4404fd
+
4404fd
+if test $RC != 0 ; then
4404fd
+	echo ">>>>> Test failed"
4404fd
+else
4404fd
+	echo ">>>>> Test succeeded"
4404fd
+	RC=0
4404fd
+fi
4404fd
+
4404fd
+test $KILLSERVERS != no && wait
4404fd
+
4404fd
+exit $RC
4404fd
-- 
4404fd
2.26.2
4404fd