summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-02-19 13:30:07 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:04 -0500
commit8dbeb4dbebb3e8cdcb83df195a91e77ac86f240a (patch)
tree63527df099275d4f0894d59c7675c875daa12820 /source3/printing
parent4218d574d718255f5f180d8d13bde450ffa5b548 (diff)
downloadsamba-8dbeb4dbebb3e8cdcb83df195a91e77ac86f240a.tar.gz
samba-8dbeb4dbebb3e8cdcb83df195a91e77ac86f240a.tar.bz2
samba-8dbeb4dbebb3e8cdcb83df195a91e77ac86f240a.zip
r21446: Karolins "printjob username"
(This used to be commit 19ee6779255a269830fa8ee51468a4738dadf942)
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/printing.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index 588641358f..39efe19604 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -2396,7 +2396,11 @@ uint32 print_job_start(struct current_user *user, int snum, char *jobname, NT_DE
fstrcpy(pjob.jobname, jobname);
if ((vuser = get_valid_user_struct(user->vuid)) != NULL) {
- fstrcpy(pjob.user, vuser->user.smb_name);
+ fstrcpy(pjob.user, lp_printjob_username(snum));
+ standard_sub_basic(vuser->user.smb_name, vuser->user.domain,
+ pjob.user, sizeof(pjob.user)-1);
+ /* ensure NULL termination */
+ pjob.user[sizeof(pjob.user)-1] = '\0';
} else {
fstrcpy(pjob.user, uidtoname(user->ut.uid));
}