summaryrefslogtreecommitdiff
path: root/auth/credentials
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2013-02-20 14:59:42 +1030
committerRusty Russell <rusty@rustcorp.com.au>2013-02-20 07:09:19 +0100
commit2f4b21bb57c4f96c5f5b57a69d022c142d8088d5 (patch)
treeccc1865699e47eaf9702953ae9a59f746fe4afa2 /auth/credentials
parent3c9c3029f2bcf10ef614dd9f923d02232db3ac8d (diff)
downloadsamba-2f4b21bb57c4f96c5f5b57a69d022c142d8088d5.tar.gz
samba-2f4b21bb57c4f96c5f5b57a69d022c142d8088d5.tar.bz2
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 'auth/credentials')
-rw-r--r--auth/credentials/credentials_secrets.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/auth/credentials/credentials_secrets.c b/auth/credentials/credentials_secrets.c
index a44fe1c8b8..730f047672 100644
--- a/auth/credentials/credentials_secrets.c
+++ b/auth/credentials/credentials_secrets.c
@@ -245,7 +245,9 @@ _PUBLIC_ NTSTATUS cli_credentials_set_machine_account(struct cli_credentials *cr
if (!tmp_ctx) {
return NT_STATUS_NO_MEMORY;
}
- secrets_tdb = lpcfg_private_path(cred, lp_ctx, "secrets.tdb");
+ secrets_tdb = lpcfg_private_path(cred, lp_ctx,
+ lpcfg_use_ntdb(lp_ctx) ?
+ "secrets.ntdb" : "secrets.tdb");
if (!secrets_tdb) {
TALLOC_FREE(tmp_ctx);
return NT_STATUS_NO_MEMORY;