param: Make the 'unicode' parameter common
authorAndrew Bartlett <abartlet@samba.org>
Sun, 22 Jul 2012 23:14:39 +0000 (09:14 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 24 Jul 2012 00:46:12 +0000 (10:46 +1000)
This parameter is most useful for interop testing, rather than production use.

Andrew Bartlett

lib/param/loadparm.c
lib/param/param_functions.c
source3/include/proto.h
source3/libsmb/clientgen.c
source3/param/loadparm.c
source3/smbd/negprot.c

index 33aef249db790bad3507204649f710fdfcca6933..ea20e2d7f3c8fd85cb7f867d8627f5e0617ff4f8 100644 (file)
@@ -1524,7 +1524,6 @@ static struct loadparm_context *global_loadparm_context;
 
 /* These functions remain only in lib/param for now */
 FN_GLOBAL_BOOL(readraw, bReadRaw)
-FN_GLOBAL_BOOL(unicode, bUnicode)
 FN_GLOBAL_BOOL(writeraw, bWriteRaw)
 FN_GLOBAL_STRING(cachedir, szCacheDir)
 FN_GLOBAL_STRING(socket_address, szSocketAddress)
index eb75f7da69936de15195ad5104ac7dc030997fa0..d12faa60e2a5dca08443a0a65b1760059c53aad4 100644 (file)
@@ -216,6 +216,7 @@ FN_GLOBAL_BOOL(syslog_only, bSyslogOnly)
 FN_GLOBAL_BOOL(timestamp_logs, bTimestampLogs)
 FN_GLOBAL_BOOL(time_server, bTimeServer)
 FN_GLOBAL_BOOL(tls_enabled, tls_enabled)
+FN_GLOBAL_BOOL(unicode, bUnicode)
 FN_GLOBAL_BOOL(unix_extensions, bUnixExtensions)
 FN_GLOBAL_BOOL(unix_password_sync, bUnixPasswdSync)
 FN_GLOBAL_BOOL(use_mmap, bUseMmap)
index 3a2bf1baa5fb13fd7d5b6f2380f6fbdfc4b9bd6b..ddccbb73b4d5268020c7c63db14ef9bdb2149ddc 100644 (file)
@@ -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);
index dcb84673394e713eca081872d604c9af981b33ab..88cb44da57f631e7b2b1d5b61c19e1ef7ebf552c 100644 (file)
@@ -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;
        }
index 2a9900b16858df39d1c636c7946637c82c18e8c3..3a21ac4fe802b156238dcaa43e7b60459afb22a5 100644 (file)
@@ -1594,6 +1594,14 @@ static struct parm_struct parm_table[] = {
                .enum_list      = enum_protocol,
                .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,
@@ -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;
index 93af42b5c1dee102a4df6eb0283308a7cbfbb757..c9350afa49459dacfef27f5f602351d0d10ff00d 100644 (file)
@@ -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;