From 1650da8a9964ba2ca3d389bdb39f65f7fa579ffc Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 18 Feb 2011 18:52:00 +1100 Subject: Add tests for various s3 auth modes --- selftest/target/Samba3.pm | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'selftest') 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 -- cgit