const char *server, const char *service, void *ret_cli)
{
NTSTATUS result;
- struct cli_state *cli;
+ struct cli_credentials *creds = NULL;
+ struct cli_state *cli = NULL;
+
+ creds = cli_session_creds_init(NULL,
+ ads->auth._user_name,
+ NULL, /* domain (use default) */
+ NULL, /* realm (use default) */
+ ads->auth._password,
+ true, /* use_kerberos */
+ true, /* fallback_after_kerberos */
+ false, /* use_ccache */
+ false); /* pw_nt_hash */
+ if (creds == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
- result = cli_full_connection(&cli,
+ result = cli_full_connection_creds(&cli,
lp_netbios_name(),
server,
NULL, 0,
service, "A:",
- ads->auth._user_name, NULL,
- ads->auth._password,
- CLI_FULL_CONNECTION_USE_KERBEROS |
- CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS,
+ creds, 0,
SMB_SIGNING_REQUIRED);
+ TALLOC_FREE(creds);
if (!NT_STATUS_IS_OK(result)) {
DEBUG(10,("check_refresh_gpo: "
"failed to connect: %s\n",