mirror of
https://github.com/samba-team/samba.git
synced 2025-08-29 13:49:30 +03:00
Fixed display of "remote downlevel document" in old print job submission
case.
Jeremy.
(This used to be commit 248770d730
)
This commit is contained in:
@ -27,17 +27,27 @@ open a print file and setup a fsp for it. This is a wrapper around
|
|||||||
print_job_start().
|
print_job_start().
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
files_struct *print_fsp_open(connection_struct *conn)
|
files_struct *print_fsp_open(connection_struct *conn, char *fname)
|
||||||
{
|
{
|
||||||
int jobid;
|
int jobid;
|
||||||
SMB_STRUCT_STAT sbuf;
|
SMB_STRUCT_STAT sbuf;
|
||||||
extern struct current_user current_user;
|
extern struct current_user current_user;
|
||||||
files_struct *fsp = file_new(conn);
|
files_struct *fsp = file_new(conn);
|
||||||
|
fstring name;
|
||||||
|
|
||||||
if(!fsp)
|
if(!fsp)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
jobid = print_job_start(¤t_user, SNUM(conn), "smb.prn");
|
fstrcpy( name, "Remote Downlevel Document");
|
||||||
|
if (fname) {
|
||||||
|
char *p = strrchr(fname, '/');
|
||||||
|
fstrcat(name, " ");
|
||||||
|
if (!p)
|
||||||
|
p = fname;
|
||||||
|
fstrcat(name, p);
|
||||||
|
}
|
||||||
|
|
||||||
|
jobid = print_job_start(¤t_user, SNUM(conn), name);
|
||||||
if (jobid == -1) {
|
if (jobid == -1) {
|
||||||
file_free(fsp);
|
file_free(fsp);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -632,7 +632,7 @@ files_struct *open_file_shared(connection_struct *conn,char *fname, SMB_STRUCT_S
|
|||||||
ignored */
|
ignored */
|
||||||
*Access = DOS_OPEN_WRONLY;
|
*Access = DOS_OPEN_WRONLY;
|
||||||
*action = FILE_WAS_CREATED;
|
*action = FILE_WAS_CREATED;
|
||||||
return print_fsp_open(conn);
|
return print_fsp_open(conn, fname);
|
||||||
}
|
}
|
||||||
|
|
||||||
fsp = file_new(conn);
|
fsp = file_new(conn);
|
||||||
|
@ -2504,7 +2504,7 @@ int reply_printopen(connection_struct *conn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Open for exclusive use, write only. */
|
/* Open for exclusive use, write only. */
|
||||||
fsp = print_fsp_open(conn);
|
fsp = print_fsp_open(conn, NULL);
|
||||||
|
|
||||||
if (!fsp) {
|
if (!fsp) {
|
||||||
END_PROFILE(SMBsplopen);
|
END_PROFILE(SMBsplopen);
|
||||||
|
Reference in New Issue
Block a user