diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-03-28 20:42:55 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-03-29 00:00:23 +0200 |
commit | c8bc7089f589e33a624183ae63c1cb1b3d652c7c (patch) | |
tree | 552e11e1cecec4fd896bea4ed1ffe81b2bf704d7 /selftest | |
parent | 2839391c7deac3436046807e4238bb9e5802530b (diff) | |
download | samba-c8bc7089f589e33a624183ae63c1cb1b3d652c7c.tar.gz samba-c8bc7089f589e33a624183ae63c1cb1b3d652c7c.tar.bz2 samba-c8bc7089f589e33a624183ae63c1cb1b3d652c7c.zip |
s3-selftest Add tests for security=server
Andrew Bartlett
Diffstat (limited to 'selftest')
-rw-r--r-- | selftest/target/Samba3.pm | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index 6a18f27231..38148ebbee 100644 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -102,6 +102,11 @@ sub setup_env($$$) return $self->setup_dc("$path/dc"); } elsif ($envname eq "secshare") { return $self->setup_secshare("$path/secshare"); + } elsif ($envname eq "secserver") { + if (not defined($self->{vars}->{dc})) { + $self->setup_dc("$path/dc"); + } + return $self->setup_secserver("$path/secserver", $self->{vars}->{dc}); } elsif ($envname eq "member") { if (not defined($self->{vars}->{dc})) { $self->setup_dc("$path/dc"); @@ -216,6 +221,40 @@ sub setup_secshare($$) return $vars; } +sub setup_secserver($$$) +{ + my ($self, $prefix, $dcvars) = @_; + + print "PROVISIONING server with security=server..."; + + my $secserver_options = " + security = server + password server = $dcvars->{SERVER_IP} +"; + + my $ret = $self->provision($prefix, + "LOCALSERVER5", + 5, + "localserver5pass", + $secserver_options); + + $ret or die("Unable to provision"); + + $self->check_or_start($ret, + ($ENV{SMBD_MAXTIME} or 2700), + "yes", "no", "yes"); + + $self->wait_for_start($ret); + + $ret->{DC_SERVER} = $dcvars->{SERVER}; + $ret->{DC_SERVER_IP} = $dcvars->{SERVER_IP}; + $ret->{DC_NETBIOSNAME} = $dcvars->{NETBIOSNAME}; + $ret->{DC_USERNAME} = $dcvars->{USERNAME}; + $ret->{DC_PASSWORD} = $dcvars->{PASSWORD}; + + return $ret; +} + sub stop_sig_term($$) { my ($self, $pid) = @_; kill("USR1", $pid) or kill("ALRM", $pid) or warn("Unable to kill $pid: $!"); |