diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-02-20 08:09:06 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-02-20 08:09:06 +0000 |
commit | 6492d6b2f6a2743f5e794447911cbbba7e031d5d (patch) | |
tree | a9a9f4b60af0cf57bc947b3967265248a80e2490 /source3/libsmb/clientgen.c | |
parent | d62754e9487d62bf11bc0a4970a1bca2dd5d6727 (diff) | |
download | samba-6492d6b2f6a2743f5e794447911cbbba7e031d5d.tar.gz samba-6492d6b2f6a2743f5e794447911cbbba7e031d5d.tar.xz samba-6492d6b2f6a2743f5e794447911cbbba7e031d5d.zip |
initial client side unicode support (needed for netapp filer)
I've currently got this code disabled by default as it is
incomplete. You enable it by setting a USE_UNICODE environment
variable. Once the support is complete this check will be removed and
the CAP_UNICODE capability bit will be the sole determination of
whether the client library code uses unicode
right now I have converted session_setup and tconx. I will do more fns
over the next few days.
see clistr.c for the new client side string interface. Luckily it
tends to make the code smaller and neater while adding unicode
support.
(This used to be commit e1a04e621f1c28d8e6e543d43741ca0272e2237f)
Diffstat (limited to 'source3/libsmb/clientgen.c')
-rw-r--r-- | source3/libsmb/clientgen.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index 19380498063..d7649074db5 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -95,19 +95,35 @@ BOOL cli_send_smb(struct cli_state *cli) return True; } +int cli_use_unicode = 0; + /**************************************************************************** setup basics in a outgoing packet ****************************************************************************/ void cli_setup_packet(struct cli_state *cli) { + static int initialised; + + /* the USE_UNICODE check will be deleted once our client side unicode + support is complete (tridge) */ + if (!initialised) { + initialised = 1; + if (getenv("USE_UNICODE")) cli_use_unicode = 1; + } + cli->rap_error = 0; cli->nt_error = 0; SSVAL(cli->outbuf,smb_pid,cli->pid); SSVAL(cli->outbuf,smb_uid,cli->vuid); SSVAL(cli->outbuf,smb_mid,cli->mid); if (cli->protocol > PROTOCOL_CORE) { + uint16 flags2; SCVAL(cli->outbuf,smb_flg,0x8); - SSVAL(cli->outbuf,smb_flg2,0x1); + flags2 = FLAGS2_LONG_PATH_COMPONENTS; + if (cli_use_unicode && cli->capabilities & CAP_UNICODE) { + flags2 |= FLAGS2_UNICODE_STRINGS; + } + SSVAL(cli->outbuf,smb_flg2, flags2); } } |