mrc0mmand / rpms / openldap

Forked from rpms/openldap 3 years ago
Clone

Blame SOURCES/openldap-cbinding-Fix-slaptest-in-test077.patch

ad145f
From e006994d83af9dcb7813a18253cf4e5beacee043 Mon Sep 17 00:00:00 2001
ad145f
From: Ryan Tandy <ryan@nardis.ca>
ad145f
Date: Sun, 26 Apr 2020 11:40:23 -0700
ad145f
Subject: [PATCH] Fix slaptest in test077
ad145f
ad145f
The libtool wrapper scripts lose argv[0] when exec'ing the real binary.
ad145f
ad145f
In the CI Docker container, where the build runs as root, this was
ad145f
actually starting a real slapd on the default port.
ad145f
ad145f
Outside Docker, running as a non-root user, this slapd would just fail
ad145f
to start, and wouldn't convert the config either.
ad145f
ad145f
Using "slapd -Tt" fixes the issue but also prints a warning from
ad145f
slaptest since the database hasn't been initialized yet.
ad145f
ad145f
Dynamic config isn't actually used in this test script, so let's just
ad145f
run slapd off the config file directly.
ad145f
---
ad145f
 tests/scripts/test077-sasl-gssapi | 11 ++---------
ad145f
 1 file changed, 2 insertions(+), 9 deletions(-)
ad145f
ad145f
diff --git a/tests/scripts/test077-sasl-gssapi b/tests/scripts/test077-sasl-gssapi
ad145f
index 19f665622..20c414600 100755
ad145f
--- a/tests/scripts/test077-sasl-gssapi
ad145f
+++ b/tests/scripts/test077-sasl-gssapi
ad145f
@@ -21,22 +21,15 @@ if test $WITH_SASL = no ; then
ad145f
         exit 0
ad145f
 fi
ad145f
 
ad145f
-SLAPTEST="$TESTWD/../servers/slapd/slaptest"
ad145f
-CONFDIR=$TESTDIR/slapd.d
ad145f
-
ad145f
 mkdir -p $TESTDIR $DBDIR1 $CONFDIR
ad145f
 cp -r $DATADIR/tls $TESTDIR
ad145f
 
ad145f
-cd $TESTWD
ad145f
-
ad145f
-
ad145f
 echo "Starting KDC for SASL/GSSAPI tests..."
ad145f
 . $SRCDIR/scripts/setup_kdc.sh
ad145f
 
ad145f
 echo "Running slapadd to build slapd database..."
ad145f
 . $CONFFILTER $BACKEND $MONITORDB < $SASLGSSAPICONF > $CONF1
ad145f
-$SLAPTEST -f $CONF1 -F $CONFDIR
ad145f
-$SLAPADD -F $CONFDIR -l $LDIFORDERED
ad145f
+$SLAPADD -f $CONF1 -l $LDIFORDERED
ad145f
 RC=$?
ad145f
 if test $RC != 0 ; then
ad145f
 	echo "slapadd failed ($RC)!"
ad145f
@@ -45,7 +38,7 @@ if test $RC != 0 ; then
ad145f
 fi
ad145f
 
ad145f
 echo "Starting ldap:/// slapd on TCP/IP port $PORT1 and ldaps:/// slapd on $PORT2..."
ad145f
-$SLAPD -F $CONFDIR -h "$URI1 $SURI2" -d $LVL $TIMING > $LOG1 2>&1 &
ad145f
+$SLAPD -f $CONF1 -h "$URI1 $SURI2" -d $LVL $TIMING > $LOG1 2>&1 &
ad145f
 PID=$!
ad145f
 if test $WAIT != 0 ; then
ad145f
     echo PID $PID
ad145f
-- 
ad145f
2.26.2
ad145f