mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
Allow %u parameters for print job username - use advanced sub
Based on 3.0 and 3.2 patch from Bo Yang <boyang@novell.com>
Bo, please verify this version works for you.
(This used to be commit 9e6760cfea
)
This commit is contained in:
parent
065fb506a2
commit
6e6d4c1f5b
@ -2439,9 +2439,11 @@ uint32 print_job_start(struct auth_serversupplied_info *server_info, int snum,
|
||||
fstrcpy(pjob.jobname, jobname);
|
||||
|
||||
fstrcpy(pjob.user, lp_printjob_username(snum));
|
||||
standard_sub_basic(server_info->sanitized_username,
|
||||
pdb_get_domain(server_info->sam_account),
|
||||
pjob.user, sizeof(pjob.user)-1);
|
||||
standard_sub_advanced(sharename, server_info->sanitized_username,
|
||||
path, server_info->utok.gid,
|
||||
server_info->sanitized_username,
|
||||
pdb_get_domain(server_info->sam_account),
|
||||
pjob.user, sizeof(pjob.user)-1);
|
||||
/* ensure NULL termination */
|
||||
pjob.user[sizeof(pjob.user)-1] = '\0';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user