summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-07-02 06:34:27 +0000
committerJeremy Allison <jra@samba.org>2002-07-02 06:34:27 +0000
commit82176f4d85225c2aae15f9ce3e03730f019934f5 (patch)
tree3a5ba0496d1e49c3c9c21de5b1fa4d8c56d593c1 /source3/param
parent9674ec6987a002ebdcfedeac4d66a096a1007bef (diff)
downloadsamba-82176f4d85225c2aae15f9ce3e03730f019934f5.tar.gz
samba-82176f4d85225c2aae15f9ce3e03730f019934f5.tar.bz2
samba-82176f4d85225c2aae15f9ce3e03730f019934f5.zip
Address the string_sub problem by changing len = 0 to mean "no expand".
Went through and checked all string_subs I could to ensure they're being used correctly. Jeremy. (This used to be commit 17cae0d683be404be69554cd0e84117bdcc56c87)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 5051d67d34..e8f5d84d3c 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -1409,7 +1409,7 @@ static char *lp_string(const char *s)
trim_string(ret, "\"", "\"");
- standard_sub_basic(current_user_info.smb_name,ret);
+ standard_sub_basic(current_user_info.smb_name,ret,len+100);
return (ret);
}
@@ -2263,7 +2263,7 @@ BOOL lp_file_list_changed(void)
time_t mod_time;
pstrcpy(n2, f->name);
- standard_sub_basic(current_user_info.smb_name, n2);
+ standard_sub_basic(current_user_info.smb_name, n2,sizeof(n2));
DEBUGADD(6, ("file %s -> %s last mod_time: %s\n",
f->name, n2, ctime(&f->modtime)));
@@ -2296,7 +2296,7 @@ static BOOL handle_netbios_name(char *pszParmValue, char **ptr)
pstrcpy(netbios_name, pszParmValue);
- standard_sub_basic(current_user_info.smb_name, netbios_name);
+ standard_sub_basic(current_user_info.smb_name, netbios_name,sizeof(netbios_name));
strupper(netbios_name);
pstrcpy(global_myname, netbios_name);
@@ -2378,7 +2378,7 @@ static BOOL handle_source_env(char *pszParmValue, char **ptr)
pstrcpy(fname, pszParmValue);
- standard_sub_basic(current_user_info.smb_name, fname);
+ standard_sub_basic(current_user_info.smb_name, fname,sizeof(fname));
string_set(ptr, pszParmValue);
@@ -2436,7 +2436,7 @@ static BOOL handle_include(char *pszParmValue, char **ptr)
pstring fname;
pstrcpy(fname, pszParmValue);
- standard_sub_basic(current_user_info.smb_name, fname);
+ standard_sub_basic(current_user_info.smb_name, fname,sizeof(fname));
add_to_file_list(pszParmValue, fname);
@@ -3518,7 +3518,7 @@ BOOL lp_load(const char *pszFname, BOOL global_only, BOOL save_defaults,
param_opt_struct *data, *pdata;
pstrcpy(n2, pszFname);
- standard_sub_basic(current_user_info.smb_name, n2);
+ standard_sub_basic(current_user_info.smb_name, n2,sizeof(n2));
add_to_file_list(pszFname, n2);
@@ -3653,7 +3653,7 @@ int lp_servicenumber(const char *pszServiceName)
* service names
*/
fstrcpy(serviceName, ServicePtrs[iService]->szService);
- standard_sub_basic(current_user_info.smb_name, serviceName);
+ standard_sub_basic(current_user_info.smb_name, serviceName,sizeof(serviceName));
if (strequal(serviceName, pszServiceName))
break;
}