diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2013-02-20 14:59:42 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2013-02-20 07:09:19 +0100 |
commit | 2f4b21bb57c4f96c5f5b57a69d022c142d8088d5 (patch) | |
tree | ccc1865699e47eaf9702953ae9a59f746fe4afa2 /selftest/target | |
parent | 3c9c3029f2bcf10ef614dd9f923d02232db3ac8d (diff) | |
download | samba-2f4b21bb57c4f96c5f5b57a69d022c142d8088d5.tar.gz samba-2f4b21bb57c4f96c5f5b57a69d022c142d8088d5.tar.xz samba-2f4b21bb57c4f96c5f5b57a69d022c142d8088d5.zip |
ntdb: switch between secrets.tdb and secrets.ntdb depending on 'use ntdb'
Since we open with dbwrap, it auto-converts old tdbs (which it will
rename to secrets.tdb.bak once it's done).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date(master): Wed Feb 20 07:09:19 CET 2013 on sn-devel-104
Diffstat (limited to 'selftest/target')
-rwxr-xr-x | selftest/target/Samba3.pm | 3 | ||||
-rw-r--r-- | selftest/target/Samba4.pm | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index 8546bd2895..c71419d4ba 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -418,6 +418,9 @@ $ret->{USERNAME} = KTEST\\Administrator system("cp $self->{srcdir}/source3/selftest/ktest-secrets.tdb $prefix/private/secrets.tdb"); chmod 0600, "$prefix/private/secrets.tdb"; +#Make sure there's no old ntdb file. + system("rm -f $prefix/private/secrets.ntdb"); + #This uses a pre-calculated krb5 credentials cache, obtained by running Samba4 with: # "--option=kdc:service ticket lifetime=239232" "--option=kdc:user ticket lifetime=239232" "--option=kdc:renewal lifetime=239232" # diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index 8ad62326cd..e9e003704e 100644 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -1512,7 +1512,7 @@ sub provision_chgdcpass($$) # 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")) { + unless (unlink("$ret->{PRIVATEDIR}/secrets.tdb") || unlink("$ret->{PRIVATEDIR}/secrets.ntdb")) { warn("Unable to remove $ret->{PRIVATEDIR}/secrets.tdb added during provision"); return undef; } |