summaryrefslogtreecommitdiff
path: root/selftest/target
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-02-18 18:52:00 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-02-22 14:50:14 +1100
commit1650da8a9964ba2ca3d389bdb39f65f7fa579ffc (patch)
tree19ac6a374eb2c79238d643edbeb3a86388d3050f /selftest/target
parentc43eb39098d1bc507f550971fab4bce61f0e5d1a (diff)
downloadsamba-1650da8a9964ba2ca3d389bdb39f65f7fa579ffc.tar.gz
samba-1650da8a9964ba2ca3d389bdb39f65f7fa579ffc.tar.bz2
samba-1650da8a9964ba2ca3d389bdb39f65f7fa579ffc.zip
Add tests for various s3 auth modes
Diffstat (limited to 'selftest/target')
-rw-r--r--selftest/target/Samba3.pm45
1 files changed, 45 insertions, 0 deletions
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index a0a13f9c72..06f070d65d 100644
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -98,6 +98,8 @@ sub setup_env($$$)
if ($envname eq "dc") {
return $self->setup_dc("$path/dc");
+ } elsif ($envname eq "secshare") {
+ return $self->setup_secshare("$path/secshare");
} elsif ($envname eq "member") {
if (not defined($self->{vars}->{dc})) {
$self->setup_dc("$path/dc");
@@ -178,6 +180,34 @@ sub setup_member($$$)
return $ret;
}
+sub setup_secshare($$)
+{
+ my ($self, $path) = @_;
+
+ print "PROVISIONING server with security=share...";
+
+ my $secshare_options = "
+ security = share
+ lanman auth = yes
+";
+
+ my $vars = $self->provision($path,
+ "LOCALSHARE4",
+ 4,
+ "local4pass",
+ $secshare_options);
+
+ $self->check_or_start($vars,
+ ($ENV{SMBD_MAXTIME} or 2700),
+ "yes", "no", "yes");
+
+ $self->wait_for_start($vars);
+
+ $self->{vars}->{secshare} = $vars;
+
+ return $vars;
+}
+
sub stop_sig_term($$) {
my ($self, $pid) = @_;
kill("USR1", $pid) or kill("ALRM", $pid) or warn("Unable to kill $pid: $!");
@@ -572,6 +602,21 @@ sub provision($$$$$$)
print CONF "
[tmp]
path = $shrdir
+[tmpguest]
+ path = $shrdir
+ guest ok = yes
+[guestonly]
+ path = $shrdir
+ guest only = yes
+ guest ok = yes
+[forceuser]
+ path = $shrdir
+ force user = $unix_name
+ guest ok = yes
+[forcegroup]
+ path = $shrdir
+ force group = nogroup
+ guest ok = yes
[ro-tmp]
path = $ro_shrdir
guest ok = yes