diff options
author | Stefan Metzmacher <metze@samba.org> | 2016-12-01 16:37:43 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2016-12-02 13:46:11 +0100 |
commit | cf9fb3067553052e06e132dcba01162f3b37e131 (patch) | |
tree | 3860a9f8072b600a5c8ad333611e7f4caec69049 /source3/libnet | |
parent | 3c67855c2bf58e7fa59ce2db719aee8c0bdd0cdc (diff) | |
download | samba-cf9fb3067553052e06e132dcba01162f3b37e131.tar.gz |
s3:libnet_join: make use of cli_full_connection_creds()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/libnet')
-rw-r--r-- | source3/libnet/libnet_join.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index 3ac7f3980e5..8275a7cc566 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -1546,9 +1546,6 @@ NTSTATUS libnet_join_ok(struct messaging_context *msg_ctx, struct netlogon_creds_CredentialState *creds = NULL; uint32_t netlogon_flags = 0; NTSTATUS status; - const char *machine_account = NULL; - const char *machine_domain = NULL; - const char *machine_password = NULL; int flags = 0; if (!dc_name) { @@ -1572,22 +1569,17 @@ NTSTATUS libnet_join_ok(struct messaging_context *msg_ctx, cli_credentials_set_old_password(cli_creds, NULL, CRED_SPECIFIED); if (use_kerberos) { - flags |= CLI_FULL_CONNECTION_USE_KERBEROS; + cli_credentials_set_kerberos_state(cli_creds, + CRED_MUST_USE_KERBEROS); } - machine_account = cli_credentials_get_username(cli_creds); - machine_domain = cli_credentials_get_domain(cli_creds); - machine_password = cli_credentials_get_password(cli_creds); - - status = cli_full_connection(&cli, NULL, - dc_name, - NULL, 0, - "IPC$", "IPC", - machine_account, - machine_domain, - machine_password, - flags, - SMB_SIGNING_IPC_DEFAULT); + status = cli_full_connection_creds(&cli, NULL, + dc_name, + NULL, 0, + "IPC$", "IPC", + cli_creds, + flags, + SMB_SIGNING_IPC_DEFAULT); if (!NT_STATUS_IS_OK(status)) { status = cli_full_connection(&cli, NULL, |