diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-01-28 20:30:16 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-01-28 21:01:49 +0100 |
commit | 6a41a2de8d2f44fc3a654416edb04538e125350c (patch) | |
tree | 71a297c32e51d730115e5733d4c18f0f837d4a26 /selftest | |
parent | 8b7c66512d2021e6e7b299adb3e93807b6b3516d (diff) | |
download | samba-6a41a2de8d2f44fc3a654416edb04538e125350c.tar.gz samba-6a41a2de8d2f44fc3a654416edb04538e125350c.tar.xz samba-6a41a2de8d2f44fc3a654416edb04538e125350c.zip |
selftest: abstract Samba3 provision a bit
metze
Diffstat (limited to 'selftest')
-rw-r--r-- | selftest/target/Samba3.pm | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index c43b61e560..0a9dd79fc8 100644 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -104,7 +104,18 @@ sub setup_dc($$) { my ($self, $path) = @_; - my $vars = $self->provision($path, "dc"); + print "PROVISIONING DC..."; + + my $dc_options = " + domain master = yes + domain logons = yes +"; + + my $vars = $self->provision($path, + "LOCALDC2", + 2, + "localdc2pass", + $dc_options); $self->check_or_start($vars, ($ENV{NMBD_MAXTIME} or 2700), @@ -280,17 +291,16 @@ sub create_clientconf($$$) close(CONF); } -sub provision($$$) +sub provision($$$$$$) { - my ($self, $prefix, $role) = @_; + my ($self, $prefix, $server, $swiface, $password, $extra_options) = @_; ## ## setup the various environment variables we need ## my %ret = (); - my $server = "LOCALHOST2"; - my $server_ip = "127.0.0.2"; + my $server_ip = "127.0.0.$swiface"; my $domain = "SAMBA-TEST"; my $unix_name = ($ENV{USER} or $ENV{LOGNAME} or `PATH=/usr/ucb:$ENV{PATH} whoami`); @@ -366,14 +376,6 @@ sub provision($$$) passdb backend = tdbsam -"; - - if ($role eq "dc") { - print CONF "\tdomain master = yes\n"; - print CONF "\tdomain logons = yes\n"; - } - -print CONF " time server = yes add user script = $nss_wrapper_pl --path $nss_wrapper_passwd --type passwd --action add --name %u @@ -401,6 +403,10 @@ print CONF " create mask = 755 vfs objects = $bindir_abs/xattr_tdb.so $bindir_abs/streams_depot.so + # Begin extra options + $extra_options + # End extra options + #Include user defined custom parameters if set $ENV{INCLUDE_CUSTOM_CONF} @@ -470,7 +476,7 @@ $unix_name-group:x:$unix_gids[0]: $ret{PIDDIR} = $piddir; $ret{WINBINDD_SOCKET_DIR} = $wbsockdir; $ret{WINBINDD_PRIV_PIPE_DIR} = $wbsockprivdir; - $ret{SOCKET_WRAPPER_DEFAULT_IFACE} => 2, + $ret{SOCKET_WRAPPER_DEFAULT_IFACE} => $swiface, $ret{NSS_WRAPPER_PASSWD} = $nss_wrapper_passwd; $ret{NSS_WRAPPER_GROUP} = $nss_wrapper_group; |