diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-07-22 13:00:21 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-07-29 04:24:07 +0200 |
commit | 8f13c84dcecb769e4ba85fa120d9ac4ac772223e (patch) | |
tree | ce4154a1c26289ebcd132e379657b4a1fcc2cc98 /selftest | |
parent | 2b47aface434000b29aa29f4ff6348cc147ae757 (diff) | |
download | samba-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.pm | 32 |
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: $!"); |