mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
selftest/Samba4: pass down the kdc address down to provision_raw_*()
metze
This commit is contained in:
parent
0d9531e2d3
commit
c3baf1529d
@ -509,9 +509,9 @@ EOF
|
|||||||
#
|
#
|
||||||
# provision_raw_prepare() is also used by Samba34.pm!
|
# provision_raw_prepare() is also used by Samba34.pm!
|
||||||
#
|
#
|
||||||
sub provision_raw_prepare($$$$$$)
|
sub provision_raw_prepare($$$$$$$)
|
||||||
{
|
{
|
||||||
my ($self, $prefix, $server_role, $netbiosname, $netbiosalias, $swiface, $password) = @_;
|
my ($self, $prefix, $server_role, $netbiosname, $netbiosalias, $swiface, $password, $kdc_ipv4) = @_;
|
||||||
my $ctx;
|
my $ctx;
|
||||||
|
|
||||||
-d $prefix or mkdir($prefix, 0777) or die("Unable to create $prefix");
|
-d $prefix or mkdir($prefix, 0777) or die("Unable to create $prefix");
|
||||||
@ -529,6 +529,7 @@ sub provision_raw_prepare($$$$$$)
|
|||||||
$ctx->{netbiosalias} = $netbiosalias;
|
$ctx->{netbiosalias} = $netbiosalias;
|
||||||
$ctx->{swiface} = $swiface;
|
$ctx->{swiface} = $swiface;
|
||||||
$ctx->{password} = $password;
|
$ctx->{password} = $password;
|
||||||
|
$ctx->{kdc_ipv4} = $kdc_ipv4;
|
||||||
|
|
||||||
$ctx->{server_loglevel} = 1;
|
$ctx->{server_loglevel} = 1;
|
||||||
$ctx->{username} = "administrator";
|
$ctx->{username} = "administrator";
|
||||||
@ -667,18 +668,18 @@ sub provision_raw_step1($$)
|
|||||||
|
|
||||||
[realms]
|
[realms]
|
||||||
$ctx->{realm} = {
|
$ctx->{realm} = {
|
||||||
kdc = 127.0.0.1:88
|
kdc = $ctx->{kdc_ipv4}:88
|
||||||
admin_server = 127.0.0.1:88
|
admin_server = $ctx->{kdc_ipv4}:88
|
||||||
default_domain = $ctx->{dnsname}
|
default_domain = $ctx->{dnsname}
|
||||||
}
|
}
|
||||||
$ctx->{dnsname} = {
|
$ctx->{dnsname} = {
|
||||||
kdc = 127.0.0.1:88
|
kdc = $ctx->{kdc_ipv4}:88
|
||||||
admin_server = 127.0.0.1:88
|
admin_server = $ctx->{kdc_ipv4}:88
|
||||||
default_domain = $ctx->{dnsname}
|
default_domain = $ctx->{dnsname}
|
||||||
}
|
}
|
||||||
$ctx->{domain} = {
|
$ctx->{domain} = {
|
||||||
kdc = 127.0.0.1:88
|
kdc = $ctx->{kdc_ipv4}:88
|
||||||
admin_server = 127.0.0.1:88
|
admin_server = $ctx->{kdc_ipv4}:88
|
||||||
default_domain = $ctx->{dnsname}
|
default_domain = $ctx->{dnsname}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -767,13 +768,13 @@ sub provision_raw_step2($$$)
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub provision($$$$$$)
|
sub provision($$$$$$$)
|
||||||
{
|
{
|
||||||
my ($self, $prefix, $server_role, $netbiosname, $netbiosalias, $swiface, $password) = @_;
|
my ($self, $prefix, $server_role, $netbiosname, $netbiosalias, $swiface, $password, $kdc_ipv4) = @_;
|
||||||
|
|
||||||
my $ctx = $self->provision_raw_prepare($prefix, $server_role,
|
my $ctx = $self->provision_raw_prepare($prefix, $server_role,
|
||||||
$netbiosname, $netbiosalias,
|
$netbiosname, $netbiosalias,
|
||||||
$swiface, $password);
|
$swiface, $password, $kdc_ipv4);
|
||||||
|
|
||||||
$ctx->{tmpdir} = "$ctx->{prefix_abs}/tmp";
|
$ctx->{tmpdir} = "$ctx->{prefix_abs}/tmp";
|
||||||
push(@{$ctx->{directories}}, "$ctx->{tmpdir}");
|
push(@{$ctx->{directories}}, "$ctx->{tmpdir}");
|
||||||
@ -895,7 +896,8 @@ sub provision_member($$$)
|
|||||||
"localmember3",
|
"localmember3",
|
||||||
"localmember",
|
"localmember",
|
||||||
3,
|
3,
|
||||||
"localmemberpass");
|
"localmemberpass",
|
||||||
|
$dcvars->{SERVER_IP});
|
||||||
|
|
||||||
$ret or die("Unable to provision");
|
$ret or die("Unable to provision");
|
||||||
|
|
||||||
@ -928,7 +930,8 @@ sub provision_dc($$)
|
|||||||
"localdc1",
|
"localdc1",
|
||||||
"localdc",
|
"localdc",
|
||||||
1,
|
1,
|
||||||
"localdcpass");
|
"localdcpass",
|
||||||
|
"127.0.0.1");
|
||||||
|
|
||||||
$self->add_wins_config("$prefix/private") or
|
$self->add_wins_config("$prefix/private") or
|
||||||
die("Unable to add wins configuration");
|
die("Unable to add wins configuration");
|
||||||
|
Loading…
Reference in New Issue
Block a user