summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-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 f43e4c029e..82570ee3bd 100644
--- a/source3/include/printing.h
+++ b/source3/include/printing.h
@@ -127,8 +127,9 @@ bool print_job_get_name(TALLOC_CTX *mem_ctx, const char *sharename, uint32_t job
WERROR print_job_delete(struct auth_serversupplied_info *server_info,
struct messaging_context *msg_ctx,
int snum, uint32_t jobid);
-bool print_job_pause(struct auth_serversupplied_info *server_info, int snum,
- uint32 jobid, WERROR *errcode);
+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);
ssize_t print_job_write(int snum, uint32 jobid, const char *buf, SMB_OFF_T pos, size_t size);
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index d3c8db3df5..89af100a4c 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -2179,8 +2179,9 @@ pause, or resume print job. User name: %s. Printer name: %s.",
Pause a job.
****************************************************************************/
-bool print_job_pause(struct auth_serversupplied_info *server_info, int snum,
- uint32 jobid, WERROR *errcode)
+bool print_job_pause(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;
@@ -2202,7 +2203,7 @@ bool print_job_pause(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, ("pause denied by security descriptor\n"));
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 097110cca0..db8fa363bc 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -6692,7 +6692,8 @@ WERROR _spoolss_SetJob(struct pipes_struct *p,
}
break;
case SPOOLSS_JOB_CONTROL_PAUSE:
- if (print_job_pause(p->server_info, snum, r->in.job_id, &errcode)) {
+ if (print_job_pause(p->server_info, p->msg_ctx,
+ snum, r->in.job_id, &errcode)) {
errcode = WERR_OK;
}
break;