summaryrefslogtreecommitdiff
path: root/source3/libsmb/clidfs.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-09-07 20:35:51 +0200
committerStefan Metzmacher <metze@samba.org>2011-09-08 10:21:50 +0200
commit3e227d8544a020d1aea24c38c9ca45a75d14c3f1 (patch)
tree607d31b7e117519742db8c5ebfd90a67a21781d3 /source3/libsmb/clidfs.c
parentcdca1e0ac3c185856fbe2d061a30bfa8e71e4e1c (diff)
downloadsamba-3e227d8544a020d1aea24c38c9ca45a75d14c3f1.tar.gz
samba-3e227d8544a020d1aea24c38c9ca45a75d14c3f1.tar.bz2
samba-3e227d8544a020d1aea24c38c9ca45a75d14c3f1.zip
s3:libsmb: pass CLI_FULL_CONNECTION_* flags via cli_connect_nb()
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu Sep 8 10:21:50 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/libsmb/clidfs.c')
-rw-r--r--source3/libsmb/clidfs.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
index a40ef896e8..68a6724d24 100644
--- a/source3/libsmb/clidfs.c
+++ b/source3/libsmb/clidfs.c
@@ -95,6 +95,7 @@ static NTSTATUS do_connect(TALLOC_CTX *ctx,
const char *username;
const char *password;
NTSTATUS status;
+ int flags = 0;
/* make a copy so we don't modify the global string 'service' */
servicename = talloc_strdup(ctx,share);
@@ -118,9 +119,20 @@ static NTSTATUS do_connect(TALLOC_CTX *ctx,
return NT_STATUS_INVALID_PARAMETER;
}
+ if (get_cmdline_auth_info_use_kerberos(auth_info)) {
+ flags |= CLI_FULL_CONNECTION_USE_KERBEROS;
+ }
+ if (get_cmdline_auth_info_fallback_after_kerberos(auth_info)) {
+ flags |= CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS;
+ }
+ if (get_cmdline_auth_info_use_ccache(auth_info)) {
+ flags |= CLI_FULL_CONNECTION_USE_CCACHE;
+ }
+
status = cli_connect_nb(
server, NULL, port, name_type, NULL,
- get_cmdline_auth_info_signing_state(auth_info), &c);
+ get_cmdline_auth_info_signing_state(auth_info),
+ flags, &c);
if (!NT_STATUS_IS_OK(status)) {
d_printf("Connection to %s failed (Error %s)\n",
@@ -133,10 +145,6 @@ static NTSTATUS do_connect(TALLOC_CTX *ctx,
max_protocol = PROTOCOL_NT1;
}
c->protocol = max_protocol;
- c->use_kerberos = get_cmdline_auth_info_use_kerberos(auth_info);
- c->fallback_after_kerberos =
- get_cmdline_auth_info_fallback_after_kerberos(auth_info);
- c->use_ccache = get_cmdline_auth_info_use_ccache(auth_info);
DEBUG(4,(" session request ok\n"));