[PATCHES] limit kerberos encryption types used by winbindd

Uri Simchoni uri at samba.org
Tue Aug 23 06:45:04 UTC 2016


Attached...

Thanks,
Uri.

On 08/23/2016 08:30 AM, Andrew Bartlett wrote:
> On Tue, 2016-08-23 at 07:59 +0300, Uri Simchoni wrote:
>> Hi Garming,
>>
>> Sorry about that - my intention was to pass those tests if tshark is
>> not
>> installed but apparently I haven't really tested this case.
>>
>> It turns out a test needs to emit success messages for subunit to
>> declare it as passed, not just return 0.
>>
>> I hope the attached fixes it - please review and push if happy.
> 
> Can you make it issue skip instead?
> 
> eg this from dbcheck-oldrelease.sh:
> 
>   subunit_start_test "ldapcmp"
>     subunit_skip_test "ldapcmp" <<EOF
> no test provision
> EOF
> 


-------------- next part --------------
From 9c6abf076674af991c91613602fb2c77ad497af7 Mon Sep 17 00:00:00 2001
From: Uri Simchoni <uri at samba.org>
Date: Tue, 23 Aug 2016 07:50:35 +0300
Subject: [PATCH v2] selftest: skip client_etypes tests if tshark or sha1sum is
 not installed

That was the original plan - not to fail existing envs, but for subunit
not to fail, it is not sufficient to just return 0 from the script.

Signed-off-by: Uri Simchoni <uri at samba.org>
---
 testprogs/blackbox/test_client_etypes.sh | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/testprogs/blackbox/test_client_etypes.sh b/testprogs/blackbox/test_client_etypes.sh
index 3327517..f424b52 100755
--- a/testprogs/blackbox/test_client_etypes.sh
+++ b/testprogs/blackbox/test_client_etypes.sh
@@ -5,10 +5,6 @@ EOF
 exit 1;
 fi
 
-#requires tshark
-which tshark > /dev/null 2>&1 || exit 0
-which sha1sum > /dev/null 2>&1 || exit 0
-
 DC_SERVER=$1
 DC_USERNAME=$2
 DC_PASSWORD=$3
@@ -16,6 +12,18 @@ BASEDIR=$4
 ETYPE_CONF=$5
 EXPECTED_ETYPES="$6"
 
+# Load test functions
+. `dirname $0`/subunit.sh
+
+#requires tshark and sha1sum
+if ! which tshark > /dev/null 2>&1 || ! which sha1sum > /dev/null 2>&1 ; then
+    subunit_start_test "client encryption types"
+    subunit_skip_test "client encryption types" <<EOF
+Skipping tests - tshark or sha1sum not installed
+EOF
+    exit 0
+fi
+
 HOSTNAME=`dd if=/dev/urandom bs=1 count=32 2>/dev/null | sha1sum | cut -b 1-10`
 
 RUNDIR=`pwd`
@@ -33,9 +41,6 @@ failed=0
 net_tool="$BINDIR/net -s $BASEDIR/$WORKDIR/client.conf --option=security=ads --option=kerberosencryptiontypes=$ETYPE_CONF"
 pcap_file=$BASEDIR/$WORKDIR/test.pcap
 
-# Load test functions
-. `dirname $0`/subunit.sh
-
 export SOCKET_WRAPPER_PCAP_FILE=$pcap_file
 testit "join" $VALGRIND $net_tool ads join -kU$DC_USERNAME%$DC_PASSWORD || failed=`expr $failed + 1`
 
-- 
2.5.5



More information about the samba-technical mailing list