summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-07-23 09:14:39 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-07-24 10:46:12 +1000
commit9521cd0409add2628352ee5ef888c5a8a90fbb27 (patch)
treefd5fe74cd7052462902bd6ca52eb2bed2be4b122 /source3
parent69e98ff86c4e90d2259b7a4ea93e45e2ec426bc3 (diff)
downloadsamba-9521cd0409add2628352ee5ef888c5a8a90fbb27.tar.gz
samba-9521cd0409add2628352ee5ef888c5a8a90fbb27.tar.bz2
samba-9521cd0409add2628352ee5ef888c5a8a90fbb27.zip
param: Make the 'unicode' parameter common
This parameter is most useful for interop testing, rather than production use. Andrew Bartlett
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/libsmb/clientgen.c3
-rw-r--r--source3/param/loadparm.c9
-rw-r--r--source3/smbd/negprot.c6
4 files changed, 18 insertions, 1 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 3a2bf1baa5..ddccbb73b4 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1163,6 +1163,7 @@ bool lp_host_msdfs(void);
bool lp_enhanced_browsing(void);
bool lp_use_mmap(void);
bool lp_unix_extensions(void);
+bool lp_unicode(void);
bool lp_use_spnego(void);
bool lp_client_use_spnego(void);
bool lp_client_use_spnego_principal(void);
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index dcb8467339..88cb44da57 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -191,6 +191,9 @@ struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx,
if (getenv("CLI_FORCE_ASCII")) {
force_ascii = true;
}
+ if (!lp_unicode()) {
+ force_ascii = true;
+ }
if (flags & CLI_FULL_CONNECTION_FORCE_ASCII) {
force_ascii = true;
}
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 2a9900b168..3a21ac4fe8 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -1595,6 +1595,14 @@ static struct parm_struct parm_table[] = {
.flags = FLAG_ADVANCED,
},
{
+ .label = "unicode",
+ .type = P_BOOL,
+ .p_class = P_GLOBAL,
+ .offset = GLOBAL_VAR(bUnicode),
+ .special = NULL,
+ .enum_list = NULL
+ },
+ {
.label = "min receivefile size",
.type = P_BYTES,
.p_class = P_GLOBAL,
@@ -4818,6 +4826,7 @@ static void init_globals(bool reinit_globals)
#else
Globals.bUseMmap = true;
#endif
+ Globals.bUnicode = true;
Globals.bUnixExtensions = true;
Globals.bResetOnZeroVC = false;
Globals.bLogWriteableFilesOnExit = false;
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index 93af42b5c1..c9350afa49 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -274,7 +274,11 @@ static void reply_nt1(struct smb_request *req, uint16 choice)
req->flags2 | FLAGS2_EXTENDED_SECURITY);
}
- capabilities |= CAP_NT_SMBS|CAP_RPC_REMOTE_APIS|CAP_UNICODE;
+ capabilities |= CAP_NT_SMBS|CAP_RPC_REMOTE_APIS;
+
+ if (lp_unicode()) {
+ capabilities |= CAP_UNICODE;
+ }
if (lp_unix_extensions()) {
capabilities |= CAP_UNIX;