summaryrefslogtreecommitdiff
path: root/selftest/target
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-02-29 12:48:21 +1100
committerAndrew Bartlett <abartlet@samba.org>2012-02-29 10:41:07 +0100
commit8e8fde51b4234b75a5b132e7ea7d9c813fe29ee0 (patch)
treef04fc88df785300f7bec34b431d2f4cd85376db6 /selftest/target
parent71587285ccf78547ee4830b03d8a1493412504a5 (diff)
downloadsamba-8e8fde51b4234b75a5b132e7ea7d9c813fe29ee0.tar.gz
samba-8e8fde51b4234b75a5b132e7ea7d9c813fe29ee0.tar.bz2
samba-8e8fde51b4234b75a5b132e7ea7d9c813fe29ee0.zip
selftest: Do not run chgdcpass test on the main DC
If winbindd has it's password changed from under it, it becomes grumpy. Andrew Bartlett
Diffstat (limited to 'selftest/target')
-rw-r--r--selftest/target/Samba4.pm46
1 files changed, 46 insertions, 0 deletions
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index 73b73cab08..43d7c8f338 100644
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -1317,6 +1317,35 @@ dcerpc endpoint servers = -unixinfo -rpcecho -spoolss -winreg -wkssvc -srvsvc
return $ret;
}
+sub provision_chgdcpass($$)
+{
+ my ($self, $prefix) = @_;
+
+ print "PROVISIONING CHGDCPASS...";
+ my $ret = $self->provision($prefix,
+ "domain controller",
+ "chgdcpass",
+ "CHDCDOMAIN",
+ "chgdcpassword.samba.example.com",
+ "2008",
+ 31,
+ "chgDCpass1",
+ undef);
+
+ return undef unless(defined $ret);
+ unless($self->add_wins_config("$prefix/private")) {
+ warn("Unable to add wins configuration");
+ return undef;
+ }
+ $ret->{DC_SERVER} = $ret->{SERVER};
+ $ret->{DC_SERVER_IP} = $ret->{SERVER_IP};
+ $ret->{DC_NETBIOSNAME} = $ret->{NETBIOSNAME};
+ $ret->{DC_USERNAME} = $ret->{USERNAME};
+ $ret->{DC_PASSWORD} = $ret->{PASSWORD};
+
+ return $ret;
+}
+
sub teardown_env($$)
{
my ($self, $envvars) = @_;
@@ -1425,6 +1454,8 @@ sub setup_env($$$)
$self->setup_dc("$path/dc");
}
return $self->setup_rodc("$path/rodc", $self->{vars}->{dc});
+ } elsif ($envname eq "chgdcpass") {
+ return $self->setup_chgdcpass("$path/chgdcpass", $self->{vars}->{chgdcpass});
} elsif ($envname eq "s3member") {
if (not defined($self->{vars}->{dc})) {
$self->setup_dc("$path/dc");
@@ -1485,6 +1516,21 @@ sub setup_dc($$)
return $env;
}
+sub setup_chgdcpass($$)
+{
+ my ($self, $path) = @_;
+
+ my $env = $self->provision_chgdcpass($path);
+ if (defined $env) {
+ $self->check_or_start($env, "single");
+
+ $self->wait_for_start($env);
+
+ $self->{vars}->{chgdcpass} = $env;
+ }
+ return $env;
+}
+
sub setup_fl2000dc($$)
{
my ($self, $path) = @_;