summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-08 14:46:04 +0200
committerVolker Lendecke <vl@samba.org>2010-08-08 16:03:26 +0200
commit7df0e672f237b01f69f1d8671732c56634e49d64 (patch)
treed43f8d1e6407546759547f48fcc87a24f0887fb6
parent2811c258f6e01d10c0eb0cb0537f96bf5f1d6275 (diff)
downloadsamba-7df0e672f237b01f69f1d8671732c56634e49d64.tar.gz
samba-7df0e672f237b01f69f1d8671732c56634e49d64.tar.bz2
samba-7df0e672f237b01f69f1d8671732c56634e49d64.zip
s3: Lift the smbd_messaging_context from print_job_resume
-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 82570ee3bd..5f8bb644ce 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 89af100a4c..f4cbbd3ccb 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 db8fa363bc..ec0d499043 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;