Ensured the %G substitution exactly matches what the man page states.
authorJeremy Allison <jra@samba.org>
Fri, 30 Nov 2001 00:28:39 +0000 (00:28 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 30 Nov 2001 00:28:39 +0000 (00:28 +0000)
Jeremy.
(This used to be commit 518084a70d0b20347411535f1dcf7453981499cf)

source3/lib/substitute.c

index 60ff62cb06ea1f954f37aacf0bc1a73e34fdd6a0..033be160626b79d91695b8dec58dd48203c4f7f6 100644 (file)
@@ -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;