diff options
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/substitute.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c index 60ff62cb06..033be16062 100644 --- a/source3/lib/substitute.c +++ b/source3/lib/substitute.c @@ -186,7 +186,8 @@ void standard_sub_basic(char *str) string_sub(p,"%U",tmp_str,l); break; case 'G' : - if ((pass = Get_Pwnam(current_user_info.smb_name))!=NULL) { + fstrcpy(tmp_str, sam_logon_in_ssb?samlogon_user:current_user_info.smb_name); + if ((pass = Get_Pwnam(tmp_str))!=NULL) { string_sub(p,"%G",gidtoname(pass->pw_gid),l); } else { p += 2; |