int fd = -1;
char *desthost;
char *p;
+ int flags = 0;
desthost = talloc_strdup(talloc_tos(), host);
if (desthost == NULL) {
goto fail;
}
- cli = cli_state_create(NULL, fd, desthost, NULL, signing_state);
+ cli = cli_state_create(NULL, fd, desthost, NULL, signing_state, flags);
if (cli == NULL) {
goto fail;
}
int fd,
const char *remote_name,
const char *remote_realm,
- int signing_state)
+ int signing_state, int flags)
{
struct cli_state *cli = NULL;
bool allow_smb_signing = false;
if (getenv("CLI_FORCE_DOSERR"))
cli->force_dos_errors = true;
+ if (flags & CLI_FULL_CONNECTION_DONT_SPNEGO) {
+ cli->use_spnego = false;
+ } else if (flags & CLI_FULL_CONNECTION_USE_KERBEROS) {
+ cli->use_kerberos = true;
+ }
+ if ((flags & CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS) &&
+ cli->use_kerberos) {
+ cli->fallback_after_kerberos = true;
+ }
+
+ if (flags & CLI_FULL_CONNECTION_USE_CCACHE) {
+ cli->use_ccache = true;
+ }
+
+ if (flags & CLI_FULL_CONNECTION_OPLOCKS) {
+ cli->use_oplocks = true;
+ }
+ if (flags & CLI_FULL_CONNECTION_LEVEL_II_OPLOCKS) {
+ cli->use_level_II_oplocks = true;
+ }
+
if (lp_client_signing()) {
allow_smb_signing = true;
}
int fd,
const char *remote_name,
const char *remote_realm,
- int signing_state);
+ int signing_state,
+ int flags);
bool cli_state_encryption_on(struct cli_state *cli);
void cli_nt_pipes_close(struct cli_state *cli);
void cli_shutdown(struct cli_state *cli);
char *ipc_username = NULL;
char *ipc_domain = NULL;
char *ipc_password = NULL;
+ int flags = 0;
struct named_mutex *mutex;
goto done;
}
+ flags |= CLI_FULL_CONNECTION_USE_KERBEROS;
+
*cli = cli_state_create(NULL, sockfd,
controller, domain->alt_name,
- Undefined);
+ Undefined, flags);
if (*cli == NULL) {
DEBUG(1, ("Could not cli_initialize\n"));
result = NT_STATUS_NO_MEMORY;
cli_set_timeout(*cli, 10000); /* 10 seconds */
- (*cli)->use_kerberos = True;
-
result = cli_negprot(*cli);
if (!NT_STATUS_IS_OK(result)) {