diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-08-29 09:10:40 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-08-29 09:10:40 +1000 |
commit | 3a303ae5ab2bfef58e0ea281e3a99406ff8fd53f (patch) | |
tree | c5fc12de72ba9691ac71368bddd044d4274ea430 /selftest | |
parent | bcc29f9e7317601737858184f5ec6243552e0c0c (diff) | |
download | samba-3a303ae5ab2bfef58e0ea281e3a99406ff8fd53f.tar.gz samba-3a303ae5ab2bfef58e0ea281e3a99406ff8fd53f.tar.bz2 samba-3a303ae5ab2bfef58e0ea281e3a99406ff8fd53f.zip |
selftest: Add a test for smbclient --machine-pass without secrets.tdb
Errors in handling the upgrade case without a matching secrets.tdb caused segfaults
in the server. This essentially tests both sides.
Andrew Bartlett
Diffstat (limited to 'selftest')
-rw-r--r-- | selftest/target/Samba4.pm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index 5442281766..28b40added 100644 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -672,6 +672,7 @@ nogroup:x:65534:nobody LOCKDIR => $ctx->{lockdir}, STATEDIR => $ctx->{statedir}, CACHEDIR => $ctx->{cachedir}, + PRIVATEDIR => $ctx->{privatedir}, SERVERCONFFILE => $ctx->{smb_conf}, CONFIGURATION => $configuration, SOCKET_WRAPPER_DEFAULT_IFACE => $ctx->{swiface}, @@ -1450,6 +1451,14 @@ sub provision_chgdcpass($$) warn("Unable to add wins configuration"); return undef; } + + # Remove secrets.tdb from this environment to test that we still start up + # on systems without the new matching secrets.tdb records + unless (unlink("$ret->{PRIVATEDIR}/secrets.tdb")) { + warn("Unable to remove $ret->{PRIVATEDIR}/secrets.tdb added during provision"); + return undef; + } + $ret->{DC_SERVER} = $ret->{SERVER}; $ret->{DC_SERVER_IP} = $ret->{SERVER_IP}; $ret->{DC_NETBIOSNAME} = $ret->{NETBIOSNAME}; |