summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-11-30 00:28:39 +0000
committerJeremy Allison <jra@samba.org>2001-11-30 00:28:39 +0000
commited7feb560be9b3ad738d1f3226b87692bc67c7e0 (patch)
tree4f0f46872c8fbc9d2e6e8bc316a85764bc935e13
parentfaac64b33f39c6404e130f50fbe32562e0794d0d (diff)
downloadsamba-ed7feb560be9b3ad738d1f3226b87692bc67c7e0.tar.gz
samba-ed7feb560be9b3ad738d1f3226b87692bc67c7e0.tar.bz2
samba-ed7feb560be9b3ad738d1f3226b87692bc67c7e0.zip
Ensured the %G substitution exactly matches what the man page states.
Jeremy. (This used to be commit 518084a70d0b20347411535f1dcf7453981499cf)
-rw-r--r--source3/lib/substitute.c3
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;