diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-04-17 15:33:50 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:51:01 -0500 |
commit | cc098d19bc3df836cceb78cb6463eb1b59e93e36 (patch) | |
tree | ace884b8c02e27fbf001c05d767b1820149ae328 /source4/script | |
parent | a412c3fc2fe3476dcedc242cf3391ef9d2f844ea (diff) | |
download | samba-cc098d19bc3df836cceb78cb6463eb1b59e93e36.tar.gz samba-cc098d19bc3df836cceb78cb6463eb1b59e93e36.tar.bz2 samba-cc098d19bc3df836cceb78cb6463eb1b59e93e36.zip |
r22311: use different ip-addresses for dc and member
metze
(This used to be commit d5b13e79233090b1bd1c2efbc910336afced015e)
Diffstat (limited to 'source4/script')
-rw-r--r-- | source4/script/tests/Samba4.pm | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/source4/script/tests/Samba4.pm b/source4/script/tests/Samba4.pm index cc8f619c79..fe8ed35ca3 100644 --- a/source4/script/tests/Samba4.pm +++ b/source4/script/tests/Samba4.pm @@ -79,8 +79,8 @@ sub check_or_start($$$) open STDOUT, ">$env_vars->{SMBD_TEST_LOG}"; open STDERR, '>&STDOUT'; - SocketWrapper::set_default_iface(1); - + SocketWrapper::set_default_iface($env_vars->{SOCKET_WRAPPER_DEFAULT_IFACE}); + # Start slapd before smbd, but with the fifo on stdin if (defined($self->{ldap})) { $self->slapd_start($env_vars) or @@ -392,7 +392,7 @@ moduleload syncprov sub provision($$$$$) { - my ($self, $prefix, $server_role, $domain, $netbiosname) = @_; + my ($self, $prefix, $server_role, $domain, $netbiosname, $swiface) = @_; my $smbd_loglevel = 1; my $username = "administrator"; @@ -412,14 +412,17 @@ sub provision($$$$$) my $krb5_config = "$etcdir/krb5.conf"; my $privatedir = "$prefix_abs/private"; my $ncalrpcdir = "$prefix_abs/ncalrpc"; - my $lockdir= "$prefix_abs/lockdir"; - + my $lockdir = "$prefix_abs/lockdir"; my $winbindd_socket_dir = "$prefix_abs/winbind_socket"; + my $configuration = "--configfile=$conffile"; my $ldapdir = "$prefix_abs/ldap"; my $tlsdir = "$privatedir/tls"; + my $ifaceipv4 = "127.0.0.$swiface"; + my $interfaces = "$ifaceipv4/8"; + (system("rm -rf $prefix/*") == 0) or die("Unable to clean up"); mkdir($_) foreach ($privatedir, $etcdir, $piddir, $ncalrpcdir, $lockdir, $tmpdir); @@ -439,7 +442,7 @@ sub provision($$$$$) js include = $srcdir/scripting/libjs winbindd socket directory = $winbindd_socket_dir name resolve order = bcast - interfaces = 127.0.0.1/8 + interfaces = $interfaces tls dh params file = $tlsdir/dhparms.pem panic action = $srcdir/script/gdb_backtrace \%PID% \%PROG% wins support = yes @@ -533,7 +536,7 @@ sub provision($$$$$) my @provision_options = ($configuration); push (@provision_options, "--host-name=$netbiosname"); - push (@provision_options, "--host-ip=127.0.0.1"); + push (@provision_options, "--host-ip=$ifaceipv4"); push (@provision_options, "--quiet"); push (@provision_options, "--domain $domain"); push (@provision_options, "--realm $realm"); @@ -562,7 +565,8 @@ sub provision($$$$$) LDAPDIR => $ldapdir, WINBINDD_SOCKET_DIR => $winbindd_socket_dir, NCALRPCDIR => $ncalrpcdir, - CONFIGURATION => $configuration + CONFIGURATION => $configuration, + SOCKET_WRAPPER_DEFAULT_IFACE => $swiface }; if (not defined($self->{ldap})) { @@ -584,7 +588,7 @@ sub provision_member($$$) print "PROVISIONING MEMBER..."; my $ret = $self->provision($prefix, "member server", "SAMBADOMAIN", - "localmember"); + "localmember", 3); $ret or die("Unable to provision"); @@ -601,7 +605,7 @@ sub provision_dc($$) print "PROVISIONING DC..."; my $ret = $self->provision($prefix, "domain controller", "SAMBADOMAIN", - "localtest"); + "localtest", 1); $self->add_wins_config("$prefix/private") or die("Unable to add wins configuration"); |