summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-03-19 22:06:54 +0000
committerGerald Carter <jerry@samba.org>2004-03-19 22:06:54 +0000
commitc24dccd413c41ed81454bc204c59d1fc17a54a33 (patch)
tree5dfc0b0db54ce4bf29cfb679340be4ed383cdcad /source3/param
parentd0b10586d1f9661a6fcf6934e52f8877c2578745 (diff)
downloadsamba-c24dccd413c41ed81454bc204c59d1fc17a54a33.tar.gz
samba-c24dccd413c41ed81454bc204c59d1fc17a54a33.tar.bz2
samba-c24dccd413c41ed81454bc204c59d1fc17a54a33.zip
BUG 417: fix %UuGg variables expansion in include lines setging the current_user_info struct in register_vuid() -- shouldn't be any more broken than we were
(This used to be commit a90c3bd281e7a62bb8482e42aa3b674eeeb5995a)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index af26697476..35bd464b56 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -2657,7 +2657,16 @@ static void add_to_file_list(const char *fname, const char *subfname)
BOOL lp_file_list_changed(void)
{
struct file_lists *f = file_lists;
- DEBUG(6, ("lp_file_list_changed()\n"));
+ char *username;
+
+ DEBUG(6, ("lp_file_list_changed()\n"));
+
+ /* get the username for substituion -- preference to the current_user_info */
+ if ( strlen( current_user_info.smb_name ) != 0 )
+ username = current_user_info.smb_name;
+ else
+ username = sub_get_smb_name();
+
while (f) {
pstring n2;
@@ -3806,9 +3815,18 @@ BOOL lp_load(const char *pszFname, BOOL global_only, BOOL save_defaults,
pstring n2;
BOOL bRetval;
param_opt_struct *data, *pdata;
+ char *username;
pstrcpy(n2, pszFname);
- standard_sub_basic(current_user_info.smb_name, n2,sizeof(n2));
+
+ /* get the username for substituion -- preference to the current_user_info */
+
+ if ( strlen( current_user_info.smb_name ) != 0 )
+ username = current_user_info.smb_name;
+ else
+ username = sub_get_smb_name();
+
+ standard_sub_basic( username, n2,sizeof(n2) );
add_to_file_list(pszFname, n2);