summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-03-28 20:42:55 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-03-29 00:00:23 +0200
commitc8bc7089f589e33a624183ae63c1cb1b3d652c7c (patch)
tree552e11e1cecec4fd896bea4ed1ffe81b2bf704d7
parent2839391c7deac3436046807e4238bb9e5802530b (diff)
downloadsamba-c8bc7089f589e33a624183ae63c1cb1b3d652c7c.tar.gz
samba-c8bc7089f589e33a624183ae63c1cb1b3d652c7c.tar.bz2
samba-c8bc7089f589e33a624183ae63c1cb1b3d652c7c.zip
s3-selftest Add tests for security=server
Andrew Bartlett
-rw-r--r--selftest/target/Samba3.pm39
-rwxr-xr-xsource3/selftest/tests.py7
2 files changed, 44 insertions, 2 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: $!");
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index 4094a573bc..d3749892f2 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -96,11 +96,14 @@ plantestsuite("samba3.ntlm_auth.(dc:local)", "dc:local", [os.path.join(samba3src
for env in ["dc", "member"]:
plantestsuite("samba3.blackbox.smbclient_auth.plain (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD', configuration])
+for env in ["secserver"]:
+ plantestsuite("samba3.blackbox.smbclient_auth.plain (%s) domain creds" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN\\\\$DC_USERNAME', '$DC_PASSWORD', configuration + " --option=clientntlmv2auth=no"])
+
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', configuration])
-for env in ["secshare"]:
- plantestsuite("samba3.blackbox.smbclient_auth.plain (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', configuration])
+for env in ["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', configuration])
# plain
for env in ["dc"]: