summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/printing.h5
-rw-r--r--source3/printing/printing.c7
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c3
3 files changed, 9 insertions, 6 deletions
diff --git a/source3/include/printing.h b/source3/include/printing.h
index 82570ee3bd2..5f8bb644ce2 100644
--- a/source3/include/printing.h
+++ b/source3/include/printing.h
@@ -130,8 +130,9 @@ WERROR print_job_delete(struct auth_serversupplied_info *server_info,
bool print_job_pause(struct auth_serversupplied_info *server_info,
struct messaging_context *msg_ctx,
int snum, uint32 jobid, WERROR *errcode);
-bool print_job_resume(struct auth_serversupplied_info *server_info, int snum,
- uint32 jobid, WERROR *errcode);
+bool print_job_resume(struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
+ int snum, uint32 jobid, WERROR *errcode);
ssize_t print_job_write(int snum, uint32 jobid, const char *buf, SMB_OFF_T pos, size_t size);
int print_queue_length(int snum, print_status_struct *pstatus);
WERROR print_job_start(struct auth_serversupplied_info *server_info,
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index 89af100a4c0..f4cbbd3ccb8 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -2243,8 +2243,9 @@ pause, or resume print job. User name: %s. Printer name: %s.",
Resume a job.
****************************************************************************/
-bool print_job_resume(struct auth_serversupplied_info *server_info, int snum,
- uint32 jobid, WERROR *errcode)
+bool print_job_resume(struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
+ int snum, uint32 jobid, WERROR *errcode)
{
const char *sharename = lp_const_servicename(snum);
struct printjob *pjob;
@@ -2266,7 +2267,7 @@ bool print_job_resume(struct auth_serversupplied_info *server_info, int snum,
}
if (!is_owner(server_info, lp_const_servicename(snum), jobid) &&
- !print_access_check(server_info, smbd_messaging_context(), snum,
+ !print_access_check(server_info, msg_ctx, snum,
JOB_ACCESS_ADMINISTER)) {
DEBUG(3, ("resume denied by security descriptor\n"));
*errcode = WERR_ACCESS_DENIED;
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index db8fa363bc0..ec0d4990436 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -6699,7 +6699,8 @@ WERROR _spoolss_SetJob(struct pipes_struct *p,
break;
case SPOOLSS_JOB_CONTROL_RESTART:
case SPOOLSS_JOB_CONTROL_RESUME:
- if (print_job_resume(p->server_info, snum, r->in.job_id, &errcode)) {
+ if (print_job_resume(p->server_info, p->msg_ctx,
+ snum, r->in.job_id, &errcode)) {
errcode = WERR_OK;
}
break;