s3-param Make charset parameters const
authorAndrew Bartlett <abartlet@samba.org>
Wed, 1 Jun 2011 01:13:30 +0000 (11:13 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 1 Jun 2011 02:19:05 +0000 (04:19 +0200)
This removes the dangerous ability for these parameters to change
based on % substitutions.

Andrew Bartlett

source3/include/proto.h
source3/param/loadparm.c

index 82bea2e1220c40a90008183c246930e3134ae182..3f5417a4717319ed19c13ae568e13528bc644c89 100644 (file)
@@ -1176,9 +1176,9 @@ NTSTATUS change_trust_account_password( const char *domain, const char *remote_m
 /* The following definitions come from param/loadparm.c  */
 
 char *lp_smb_ports(void);
-char *lp_dos_charset(void);
-char *lp_unix_charset(void);
-char *lp_display_charset(void);
+const char *lp_dos_charset(void);
+const char *lp_unix_charset(void);
+const char *lp_display_charset(void);
 char *lp_logfile(void);
 char *lp_configfile(void);
 char *lp_smb_passwd_file(void);
index 02b08a60a234c6e14f161831f9770c4fac1ca079..a8e5f19c40bc22171202e97307c81687ab9fd323 100644 (file)
@@ -5565,9 +5565,9 @@ static char *lp_string(const char *s)
  char fn_name(const struct share_params *p) {return(LP_SNUM_OK(p->service)? ServicePtrs[(p->service)]->val : sDefault.val);}
 
 FN_GLOBAL_STRING(lp_smb_ports, &Globals.smb_ports)
-FN_GLOBAL_STRING(lp_dos_charset, &Globals.dos_charset)
-FN_GLOBAL_STRING(lp_unix_charset, &Globals.unix_charset)
-FN_GLOBAL_STRING(lp_display_charset, &Globals.display_charset)
+FN_GLOBAL_CONST_STRING(lp_dos_charset, &Globals.dos_charset)
+FN_GLOBAL_CONST_STRING(lp_unix_charset, &Globals.unix_charset)
+FN_GLOBAL_CONST_STRING(lp_display_charset, &Globals.display_charset)
 FN_GLOBAL_STRING(lp_logfile, &Globals.szLogFile)
 FN_GLOBAL_STRING(lp_configfile, &Globals.szConfigFile)
 FN_GLOBAL_STRING(lp_smb_passwd_file, &Globals.szSMBPasswdFile)