diff options
-rw-r--r-- | source3/include/proto.h | 2 | ||||
-rw-r--r-- | source3/printing/printfsp.c | 6 | ||||
-rw-r--r-- | source3/smbd/open.c | 2 | ||||
-rw-r--r-- | source3/smbd/reply.c | 2 |
4 files changed, 5 insertions, 7 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 602e2646fd..6cef348893 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -6727,7 +6727,7 @@ bool sysv_cache_reload(void); /* The following definitions come from printing/printfsp.c */ NTSTATUS print_fsp_open(connection_struct *conn, const char *fname, - files_struct **result); + uint16_t current_vuid, files_struct **result); void print_fsp_end(files_struct *fsp, enum file_close_type close_type); /* The following definitions come from printing/printing.c */ diff --git a/source3/printing/printfsp.c b/source3/printing/printfsp.c index 4a2b26d2cd..c6749226fd 100644 --- a/source3/printing/printfsp.c +++ b/source3/printing/printfsp.c @@ -20,15 +20,13 @@ #include "includes.h" -extern struct current_user current_user; - /*************************************************************************** open a print file and setup a fsp for it. This is a wrapper around print_job_start(). ***************************************************************************/ NTSTATUS print_fsp_open(connection_struct *conn, const char *fname, - files_struct **result) + uint16_t current_vuid, files_struct **result) { int jobid; SMB_STRUCT_STAT sbuf; @@ -70,7 +68,7 @@ NTSTATUS print_fsp_open(connection_struct *conn, const char *fname, /* setup a full fsp */ fsp->fh->fd = print_job_fd(lp_const_servicename(SNUM(conn)),jobid); GetTimeOfDay(&fsp->open_time); - fsp->vuid = current_user.vuid; + fsp->vuid = current_vuid; fsp->fh->pos = -1; fsp->can_lock = True; fsp->can_read = False; diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 3cec80c6df..aa3bbdf685 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1178,7 +1178,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn, DEBUG(10, ("open_file_ntcreate: printer open fname=%s\n", fname)); - return print_fsp_open(conn, fname, result); + return print_fsp_open(conn, fname, req->vuid, result); } if (!parent_dirname_talloc(talloc_tos(), fname, &parent_dir, diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index aaa284dc39..ee646aa7c3 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -4642,7 +4642,7 @@ void reply_printopen(struct smb_request *req) } /* Open for exclusive use, write only. */ - status = print_fsp_open(conn, NULL, &fsp); + status = print_fsp_open(conn, NULL, req->vuid, &fsp); if (!NT_STATUS_IS_OK(status)) { reply_nterror(req, status); |