summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-01 11:13:30 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-01 04:19:05 +0200
commitf52b97a1292e4e84fccd4601d341de857cc5e586 (patch)
treeec083fc66bfc25089dc9ffac755b4f1a65f54707
parentec9ff19e60907d6858c6a04f3fcd0e61d5c83100 (diff)
downloadsamba-f52b97a1292e4e84fccd4601d341de857cc5e586.tar.gz
samba-f52b97a1292e4e84fccd4601d341de857cc5e586.tar.bz2
samba-f52b97a1292e4e84fccd4601d341de857cc5e586.zip
s3-param Make charset parameters const
This removes the dangerous ability for these parameters to change based on % substitutions. Andrew Bartlett
-rw-r--r--source3/include/proto.h6
-rw-r--r--source3/param/loadparm.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 82bea2e122..3f5417a471 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -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);
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 02b08a60a2..a8e5f19c40 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -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)