summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--selftest/target/Samba3.pm32
-rwxr-xr-xsource3/selftest/tests.py5
2 files changed, 36 insertions, 1 deletions
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 49f8b4d6d3..93b999fbb4 100644
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -95,6 +95,8 @@ sub setup_env($$$)
return $self->setup_s3dc("$path/s3dc");
} elsif ($envname eq "secshare") {
return $self->setup_secshare("$path/secshare");
+ } elsif ($envname eq "maptoguest") {
+ return $self->setup_maptoguest("$path/maptoguest");
} elsif ($envname eq "ktest") {
return $self->setup_ktest("$path/ktest");
} elsif ($envname eq "secserver") {
@@ -472,6 +474,36 @@ $ret->{USERNAME} = KTEST\\Administrator
return $ret;
}
+sub setup_maptoguest($$)
+{
+ my ($self, $path) = @_;
+
+ print "PROVISIONING maptoguest...";
+
+ my $options = "
+map to guest = bad user
+";
+
+ my $vars = $self->provision($path,
+ "maptoguest",
+ 7,
+ "maptoguestpass",
+ $options);
+
+ $vars or return undef;
+
+ $self->check_or_start($vars,
+ "yes", "no", "yes");
+
+ if (not $self->wait_for_start($vars)) {
+ return undef;
+ }
+
+ $self->{vars}->{s3maptoguest} = $vars;
+
+ return $vars;
+}
+
sub stop_sig_term($$) {
my ($self, $pid) = @_;
kill("USR1", $pid) or kill("ALRM", $pid) or warn("Unable to kill $pid: $!");
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index 0b0da7f934..b6fb166fe0 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -108,9 +108,12 @@ for env in ["secserver"]:
for env in ["member"]:
plantestsuite("samba3.blackbox.smbclient_auth.plain (%s) member creds" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$SERVER\\\\$USERNAME', '$PASSWORD', binpath('smbclient3'), configuration])
-for env in ["secshare", "secserver"]:
+for env in ["maptoguest", "secshare", "secserver"]:
plantestsuite("samba3.blackbox.smbclient_auth.plain (%s) local creds" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', binpath('smbclient3'), configuration + " --option=clientntlmv2auth=no --option=clientlanmanauth=yes"])
+env = "maptoguest"
+plantestsuite("samba3.blackbox.smbclient_auth.plain (%s) bad username" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', 'notmy$USERNAME', '$PASSWORD', binpath('smbclient3'), configuration + " --option=clientntlmv2auth=no --option=clientlanmanauth=yes"])
+
# plain
for env in ["s3dc"]:
plantestsuite("samba3.blackbox.smbclient_s3.plain (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_s3.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', '$DC_USERNAME', '$DC_PASSWORD', '$USERID', '$LOCAL_PATH', '$PREFIX', binpath('smbclient3'), configuration])