summaryrefslogtreecommitdiff
path: root/selftest
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-07-22 13:00:21 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-07-29 04:24:07 +0200
commit8f13c84dcecb769e4ba85fa120d9ac4ac772223e (patch)
treece4154a1c26289ebcd132e379657b4a1fcc2cc98 /selftest
parent2b47aface434000b29aa29f4ff6348cc147ae757 (diff)
downloadsamba-8f13c84dcecb769e4ba85fa120d9ac4ac772223e.tar.gz
s3-selftest Add tests for 'map to guest = bad user'
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'selftest')
-rw-r--r--selftest/target/Samba3.pm32
1 files changed, 32 insertions, 0 deletions
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 49f8b4d6d3c..93b999fbb47 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: $!");