Allow %u parameters for print job username - use advanced sub
authorBo Yang <boyang@novell.com>
Wed, 16 Jul 2008 15:11:55 +0000 (11:11 -0400)
committerJim McDonough <jmcd@samba.org>
Wed, 16 Jul 2008 15:11:55 +0000 (11:11 -0400)
source/printing/printing.c

index 4ff9b6b..3e1a9ff 100644 (file)
@@ -2397,8 +2397,10 @@ uint32 print_job_start(struct current_user *user, int snum, char *jobname, NT_DE
 
        if ((vuser = get_valid_user_struct(user->vuid)) != NULL) {
                fstrcpy(pjob.user, lp_printjob_username(snum));
-               standard_sub_basic(vuser->user.smb_name, vuser->user.domain, 
-                                  pjob.user, sizeof(pjob.user)-1);
+               standard_sub_advanced(sharename, vuser->user.smb_name, path, 
+                                       vuser->gid, vuser->user.smb_name, 
+                                       vuser->user.domain, pjob.user, 
+                                       sizeof(pjob.user) - 1);
                /* ensure NULL termination */ 
                pjob.user[sizeof(pjob.user)-1] = '\0'; 
        } else {