diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-09-08 09:49:26 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-09-08 17:51:30 +0200 |
commit | a7e418dd45fe81af4ec4fbddfcfffb491487a8b7 (patch) | |
tree | 1d229cf3991ece03c6a086b9abbef1df835f6968 /source3/libsmb | |
parent | db79aa7260759c451e38e2df46562d01ce5514c6 (diff) | |
download | samba-a7e418dd45fe81af4ec4fbddfcfffb491487a8b7.tar.gz samba-a7e418dd45fe81af4ec4fbddfcfffb491487a8b7.tar.bz2 samba-a7e418dd45fe81af4ec4fbddfcfffb491487a8b7.zip |
s3:libsmb: add CLI_FULL_CONNECTION_FORCE_ASCII
metze
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/cliconnect.c | 3 | ||||
-rw-r--r-- | source3/libsmb/clientgen.c | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 2ae7cbbcde..fd0536cb6f 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -2723,8 +2723,9 @@ static void cli_negprot_done(struct tevent_req *subreq) cli->max_xmit = MIN(cli->max_xmit, CLI_BUFFER_SIZE); /* a way to force ascii SMB */ - if (getenv("CLI_FORCE_ASCII")) + if (cli->force_ascii) { cli->capabilities &= ~CAP_UNICODE; + } tevent_req_done(req); } diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index ad4274a282..f274dc0b63 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -206,6 +206,14 @@ struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx, } if (flags & CLI_FULL_CONNECTION_FORCE_DOS_ERRORS) { cli->force_dos_errors = true; + } + + if (getenv("CLI_FORCE_ASCII")) { + cli->force_ascii = true; + } + if (flags & CLI_FULL_CONNECTION_FORCE_ASCII) { + cli->force_ascii = true; + } if (flags & CLI_FULL_CONNECTION_DONT_SPNEGO) { cli->use_spnego = false; |