From: Andreas Schneider Date: Fri, 16 Nov 2018 14:40:59 +0000 (+0100) Subject: s3:tests: Test for users connecting to their 'homes' share X-Git-Tag: tdb-1.3.17~517 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc471448df91c43fe38e2fcdf9b3874636ca51a6;p=thirdparty%2Fsamba.git s3:tests: Test for users connecting to their 'homes' share This adds a test for CVE-2009-2813. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13699 Signed-off-by: Andreas Schneider Reviewed-by: Ralph Böhme --- diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index 0547418b657..d90945c3830 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -977,6 +977,10 @@ sub setup_fileserver comment = inherit only unix owner inherit owner = unix only acl_xattr:ignore system acls = yes +[homes] + comment = Home directories + browseable = No + read only = No "; my $vars = $self->provision($path, "WORKGROUP", diff --git a/source3/script/tests/test_homes.sh b/source3/script/tests/test_homes.sh new file mode 100755 index 00000000000..06de0a0c301 --- /dev/null +++ b/source3/script/tests/test_homes.sh @@ -0,0 +1,99 @@ +#!/bin/sh + +# Copyright (c) Andreas Schneider +# License: GPLv3 + +if [ $# -lt 7 ]; then + echo "Usage: test_homes.sh SERVER USERNAME PASSWORD LOCAL_PATH PREFIX SMBCLIENT CONFIGURATION" + exit 1 +fi + +SERVER="${1}" +USERNAME="${2}" +PASSWORD="${3}" +LOCAL_PATH="${4}" +PREFIX="${5}" +SMBCLIENT="${6}" +CONFIGURATION="${7}" +shift 7 + +incdir=`dirname $0`/../../../testprogs/blackbox +. $incdir/subunit.sh + +failed=0 + +test_gooduser_home() +{ + tmpfile=$PREFIX/smbclient_homes_gooduser_commands + cat > $tmpfile < $tmpfile <