summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/cliconnect.c4
-rw-r--r--source4/libcli/raw/rawnegotiate.c7
-rw-r--r--source4/libcli/smb_composite/connect.c2
3 files changed, 7 insertions, 6 deletions
diff --git a/source4/libcli/cliconnect.c b/source4/libcli/cliconnect.c
index d806653758..39f97f4d8c 100644
--- a/source4/libcli/cliconnect.c
+++ b/source4/libcli/cliconnect.c
@@ -55,9 +55,9 @@ bool smbcli_transport_establish(struct smbcli_state *cli,
}
/* wrapper around smb_raw_negotiate() */
-NTSTATUS smbcli_negprot(struct smbcli_state *cli, int maxprotocol)
+NTSTATUS smbcli_negprot(struct smbcli_state *cli, bool unicode, int maxprotocol)
{
- return smb_raw_negotiate(cli->transport, maxprotocol);
+ return smb_raw_negotiate(cli->transport, unicode, maxprotocol);
}
/* wrapper around smb_raw_sesssetup() */
diff --git a/source4/libcli/raw/rawnegotiate.c b/source4/libcli/raw/rawnegotiate.c
index 82d6fe5236..78b9082521 100644
--- a/source4/libcli/raw/rawnegotiate.c
+++ b/source4/libcli/raw/rawnegotiate.c
@@ -46,6 +46,7 @@ static const struct {
Send a negprot command.
*/
struct smbcli_request *smb_raw_negotiate_send(struct smbcli_transport *transport,
+ bool unicode,
int maxprotocol)
{
struct smbcli_request *req;
@@ -58,7 +59,7 @@ struct smbcli_request *smb_raw_negotiate_send(struct smbcli_transport *transport
}
flags2 |= FLAGS2_32_BIT_ERROR_CODES;
- if (lp_unicode(global_loadparm)) {
+ if (unicode) {
flags2 |= FLAGS2_UNICODE_STRINGS;
}
flags2 |= FLAGS2_EXTENDED_ATTRIBUTES;
@@ -190,8 +191,8 @@ failed:
/*
Send a negprot command (sync interface)
*/
-NTSTATUS smb_raw_negotiate(struct smbcli_transport *transport, int maxprotocol)
+NTSTATUS smb_raw_negotiate(struct smbcli_transport *transport, bool unicode, int maxprotocol)
{
- struct smbcli_request *req = smb_raw_negotiate_send(transport, maxprotocol);
+ struct smbcli_request *req = smb_raw_negotiate_send(transport, unicode, maxprotocol);
return smb_raw_negotiate_recv(req);
}
diff --git a/source4/libcli/smb_composite/connect.c b/source4/libcli/smb_composite/connect.c
index 9f18c0d924..0238d5c550 100644
--- a/source4/libcli/smb_composite/connect.c
+++ b/source4/libcli/smb_composite/connect.c
@@ -63,7 +63,7 @@ static NTSTATUS connect_send_negprot(struct composite_context *c,
{
struct connect_state *state = talloc_get_type(c->private_data, struct connect_state);
- state->req = smb_raw_negotiate_send(state->transport,
+ state->req = smb_raw_negotiate_send(state->transport, lp_unicode(global_loadparm),
lp_cli_maxprotocol(global_loadparm));
NT_STATUS_HAVE_NO_MEMORY(state->req);