summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-08-11 21:09:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:57:51 -0500
commitb3e7722a88cec3ffdc937effbeff149b8353df72 (patch)
treeb5ac03eeea451d19264bf201fea38491106c4164 /source4/libcli
parentdaa4a722f9623e057981c01efdb9d831a174a53c (diff)
downloadsamba-b3e7722a88cec3ffdc937effbeff149b8353df72.tar.gz
samba-b3e7722a88cec3ffdc937effbeff149b8353df72.tar.bz2
samba-b3e7722a88cec3ffdc937effbeff149b8353df72.zip
r1738: honor the "unicode=yes/no" option in the SMB client library
(This used to be commit b6664bdd0f4125a483620b76a87ea69cad866d6a)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/raw/rawnegotiate.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/libcli/raw/rawnegotiate.c b/source4/libcli/raw/rawnegotiate.c
index dab7b38939..5ec827eebb 100644
--- a/source4/libcli/raw/rawnegotiate.c
+++ b/source4/libcli/raw/rawnegotiate.c
@@ -53,7 +53,9 @@ struct smbcli_request *smb_negprot_send(struct smbcli_transport *transport, int
}
flags2 |= FLAGS2_32_BIT_ERROR_CODES;
- flags2 |= FLAGS2_UNICODE_STRINGS;
+ if (lp_unicode()) {
+ flags2 |= FLAGS2_UNICODE_STRINGS;
+ }
flags2 |= FLAGS2_EXTENDED_ATTRIBUTES;
flags2 |= FLAGS2_LONG_PATH_COMPONENTS;
flags2 |= FLAGS2_IS_LONG_NAME;
@@ -172,7 +174,7 @@ NTSTATUS smb_raw_negotiate(struct smbcli_transport *transport)
}
/* a way to force ascii SMB */
- if (getenv("SMBCLI_FORCE_ASCII")) {
+ if (!lp_unicode() || getenv("SMBCLI_FORCE_ASCII")) {
transport->negotiate.capabilities &= ~CAP_UNICODE;
}