]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:utils: use the correct secrets.tdb in net_use_krb_machine_account()
authorStefan Metzmacher <metze@samba.org>
Wed, 11 Sep 2024 16:21:58 +0000 (18:21 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 20 Sep 2024 05:54:43 +0000 (05:54 +0000)
On a cluster we need to use the ctdb controlled database and not
a local secrets.tdb...

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15714

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Sep 20 05:54:43 UTC 2024 on atb-devel-224

selftest/knownfail.d/net_ads_testjoin [deleted file]
source3/utils/net_util.c

diff --git a/selftest/knownfail.d/net_ads_testjoin b/selftest/knownfail.d/net_ads_testjoin
deleted file mode 100644 (file)
index 4e88d4a..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-^samba3.blackbox.update_keytab_clustered.net_ads_testjoin_initial.clusteredmember
-^samba3.blackbox.update_keytab_clustered.net_ads_testjoin_after_sync.clusteredmember
-^samba3.blackbox.update_keytab_clustered.wbinfo_change_secret_after_sync.clusteredmember
-^samba3.blackbox.update_keytab_clustered.net_ads_testjoin_final.clusteredmember
index 93e08cafbf11f3f1f6654ddb02cd87f4f3a90b83..5039902bc5e98032e99da8725afa94e225d642c9 100644 (file)
@@ -259,12 +259,16 @@ NTSTATUS connect_dst_pipe(struct net_context *c, struct cli_state **cli_dst,
 
 int net_use_krb_machine_account(struct net_context *c)
 {
+       struct db_context *db_ctx = NULL;
+
        if (!secrets_init()) {
                d_fprintf(stderr,_("ERROR: Unable to open secrets database\n"));
                exit(1);
        }
 
-       cli_credentials_set_machine_account(c->creds, c->lp_ctx);
+       db_ctx = secrets_db_ctx();
+
+       cli_credentials_set_machine_account_db_ctx(c->creds, c->lp_ctx, db_ctx);
        c->explicit_credentials = true;
        return 0;
 }