From: Jeremy Allison Date: Thu, 16 Jun 2022 18:57:58 +0000 (-0700) Subject: s3: test: Add tests to show we still connect to a full_audit share with a bad success... X-Git-Tag: tevent-0.13.0~406 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe78d3c014d1756fe628175baeaa08c58e3e2f02;p=thirdparty%2Fsamba.git s3: test: Add tests to show we still connect to a full_audit share with a bad success or fail VFS names. Add knownfail. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15098 Signed-off-by: Jeremy Allison Reviewed-by: Andrew Bartlett --- diff --git a/selftest/knownfail.d/full_audit_badname b/selftest/knownfail.d/full_audit_badname new file mode 100644 index 00000000000..b353875fb4e --- /dev/null +++ b/selftest/knownfail.d/full_audit_badname @@ -0,0 +1,2 @@ +^samba3.blackbox.test_full_audit_success_badname.Cannot\ connect\ to\ share\ full_audit_success_bad_name\(fileserver\) +^samba3.blackbox.test_full_audit_fail_badname.Cannot\ connect\ to\ share\ full_audit_fail_bad_name\(fileserver\) diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index 8c3e840eded..c080c23f2ba 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -3396,6 +3396,14 @@ sub provision($$) [acls_non_canonical] copy = tmp acl flag inherited canonicalization = no + +[full_audit_success_bad_name] + copy = tmp + full_audit:success = badname + +[full_audit_fail_bad_name] + copy = tmp + full_audit:failure = badname "; close(CONF); diff --git a/source3/script/tests/test_bad_auditnames.sh b/source3/script/tests/test_bad_auditnames.sh new file mode 100755 index 00000000000..69ddf1436f4 --- /dev/null +++ b/source3/script/tests/test_bad_auditnames.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +# this tests a full audit share with bad VFS +# names will not allow connection. +# BUG: https://bugzilla.samba.org/show_bug.cgi?id=15098 + +if [ $# -lt 5 ]; then + cat </dev/null 2>&1 +} + +testit "Cannot connect to share $SHARE" can_connect || failed=$((failed + 1)) diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py index ff149aade4e..2e62696cb82 100755 --- a/source3/selftest/tests.py +++ b/source3/selftest/tests.py @@ -670,6 +670,12 @@ for env in ["fileserver"]: plantestsuite("samba3.blackbox.fifo", env, [os.path.join(samba3srcdir, "script/tests/test_fifo.sh"), '$SERVER', '$DOMAIN', 'gooduser', '$PASSWORD', '$PREFIX', env, smbclient3]) + plantestsuite("samba3.blackbox.test_full_audit_success_badname", env, + [os.path.join(samba3srcdir, "script/tests/test_bad_auditnames.sh"), + '$SERVER', 'full_audit_success_bad_name', '$USERNAME', '$PASSWORD', smbclient3]) + plantestsuite("samba3.blackbox.test_full_audit_fail_badname", env, + [os.path.join(samba3srcdir, "script/tests/test_bad_auditnames.sh"), + '$SERVER', 'full_audit_fail_bad_name', '$USERNAME', '$PASSWORD', smbclient3]) for env in ["fileserver:local"]: plantestsuite("samba3.blackbox.net_usershare", env, [os.path.join(samba3srcdir, "script/tests/test_net_usershare.sh"), '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', smbclient3])