summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-08 14:44:32 +0200
committerVolker Lendecke <vl@samba.org>2010-08-08 16:03:26 +0200
commit2811c258f6e01d10c0eb0cb0537f96bf5f1d6275 (patch)
treedb3940c8f0c82f6891387e45c6bb5a79a33d6472 /source3
parent8dcbeecd6d0aac40da23aef8a4e126faa1bf43e2 (diff)
downloadsamba-2811c258f6e01d10c0eb0cb0537f96bf5f1d6275.tar.gz
samba-2811c258f6e01d10c0eb0cb0537f96bf5f1d6275.tar.bz2
samba-2811c258f6e01d10c0eb0cb0537f96bf5f1d6275.zip
s3: Lift the smbd_messaging_context from print_job_pause
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;