1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-20 14:03:59 +03:00

s3:utils: use the correct secrets.tdb in net_use_krb_machine_account()

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

(cherry picked from commit f9ee4db2ba74e4f1f1b6d6f32082e5b0fe60f9b9)
This commit is contained in:
Stefan Metzmacher 2024-09-11 18:21:58 +02:00 committed by Jule Anger
parent d583d40ca3
commit 4bec0a7fd1
2 changed files with 5 additions and 5 deletions

View File

@ -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

View 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;
}