1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

s3:client: avoid using cli->{use_kerberos,...} for cli_session_creds_init() in smbspool.c

CLI_FULL_CONNECTION_USE_KERBEROS is the only possible flag the
caller of smb_complete_connection() will pass, so we can avoid
use it directly instead of going via cli_start_connection()
to use cli->use_kerberos.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Stefan Metzmacher 2016-10-30 16:21:31 +01:00 committed by Andreas Schneider
parent 9bf8805ee9
commit 77a7e72f88

View File

@ -406,6 +406,7 @@ smb_complete_connection(const char *myname,
struct cli_state *cli; /* New connection */
NTSTATUS nt_status;
struct cli_credentials *creds = NULL;
bool use_kerberos = false;
/* Start the SMB connection */
*need_auth = false;
@ -425,15 +426,19 @@ smb_complete_connection(const char *myname,
return NULL;
}
if (flags & CLI_FULL_CONNECTION_USE_KERBEROS) {
use_kerberos = true;
}
creds = cli_session_creds_init(cli,
username,
workgroup,
NULL, /* realm */
password,
cli->use_kerberos,
cli->fallback_after_kerberos,
cli->use_ccache,
cli->pw_nt_hash);
use_kerberos,
false, /* fallback_after_kerberos */
false, /* use_ccache */
false); /* password_is_nt_hash */
if (creds == NULL) {
fprintf(stderr, "ERROR: cli_session_creds_init failed\n");
cli_shutdown(cli);