diff options
author | Andrew Bartlett <abartlet@samba.org> | 2014-10-06 13:51:25 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2014-10-17 12:57:07 +0200 |
commit | e9dc6423d3f1ab3401314e134ecc574fc5d4c18b (patch) | |
tree | 02d54f896cf0e4cf816adfa897299bcdd42c8285 /auth | |
parent | 35b8ed7710f60abcc70e0b070afc16bf3faef263 (diff) | |
download | samba-e9dc6423d3f1ab3401314e134ecc574fc5d4c18b.tar.gz samba-e9dc6423d3f1ab3401314e134ecc574fc5d4c18b.tar.xz samba-e9dc6423d3f1ab3401314e134ecc574fc5d4c18b.zip |
auth/credentials: Ensure that we set the realm when reading secrets.tdb
Otherwise, we try and kinit as host$@DOMAIN and that will not work.
Andrew Bartlett
Change-Id: Id2fde673423e74dfa1e6ac48f47f49c61ee59779
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'auth')
-rw-r--r-- | auth/credentials/credentials_secrets.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/auth/credentials/credentials_secrets.c b/auth/credentials/credentials_secrets.c index 13717b165e..d259a4daef 100644 --- a/auth/credentials/credentials_secrets.c +++ b/auth/credentials/credentials_secrets.c @@ -359,6 +359,9 @@ _PUBLIC_ NTSTATUS cli_credentials_set_machine_account_db_ctx(struct cli_credenti cli_credentials_set_password(cred, secrets_tdb_password, CRED_SPECIFIED); cli_credentials_set_old_password(cred, secrets_tdb_old_password, CRED_SPECIFIED); cli_credentials_set_domain(cred, domain, CRED_SPECIFIED); + if (strequal(domain, lpcfg_workgroup(lp_ctx))) { + cli_credentials_set_realm(cred, lpcfg_realm(lp_ctx), CRED_SPECIFIED); + } cli_credentials_set_username(cred, machine_account, CRED_SPECIFIED); cli_credentials_set_password_last_changed_time(cred, secrets_tdb_lct); cli_credentials_set_secure_channel_type(cred, secrets_tdb_secure_channel_type); |