summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-08 14:42:47 +0200
committerVolker Lendecke <vl@samba.org>2010-08-08 16:03:26 +0200
commit8dcbeecd6d0aac40da23aef8a4e126faa1bf43e2 (patch)
treea42cd77e6b02f990f1e5182d58849b224c7a0a09
parent4a514d2261b7528696f96bb29717fb7a20708869 (diff)
downloadsamba-8dcbeecd6d0aac40da23aef8a4e126faa1bf43e2.tar.gz
samba-8dcbeecd6d0aac40da23aef8a4e126faa1bf43e2.tar.bz2
samba-8dcbeecd6d0aac40da23aef8a4e126faa1bf43e2.zip
s3: Lift the smbd_messaging_context from print_job_delete
-rw-r--r--source3/include/printing.h3
-rw-r--r--source3/printing/printing.c3
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c5
3 files changed, 7 insertions, 4 deletions
diff --git a/source3/include/printing.h b/source3/include/printing.h
index eb277c991a..f43e4c029e 100644
--- a/source3/include/printing.h
+++ b/source3/include/printing.h
@@ -125,7 +125,8 @@ struct spoolss_DeviceMode *print_job_devmode(const char* sharename, uint32 jobid
bool print_job_set_name(const char *sharename, uint32 jobid, const char *name);
bool print_job_get_name(TALLOC_CTX *mem_ctx, const char *sharename, uint32_t jobid, char **name);
WERROR print_job_delete(struct auth_serversupplied_info *server_info,
- int snum, uint32 jobid);
+ 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_resume(struct auth_serversupplied_info *server_info, int snum,
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index ec9274cb35..d3c8db3df5 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -2112,6 +2112,7 @@ static bool is_owner(struct auth_serversupplied_info *server_info,
****************************************************************************/
WERROR print_job_delete(struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
int snum, uint32_t jobid)
{
const char* sharename = lp_const_servicename(snum);
@@ -2125,7 +2126,7 @@ WERROR print_job_delete(struct auth_serversupplied_info *server_info,
owns their job. */
if (!owner &&
- !print_access_check(server_info, smbd_messaging_context(), snum,
+ !print_access_check(server_info, msg_ctx, snum,
JOB_ACCESS_ADMINISTER)) {
DEBUG(3, ("delete denied by security descriptor\n"));
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 7ec0162f1a..097110cca0 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -5405,7 +5405,8 @@ WERROR _spoolss_AbortPrinter(struct pipes_struct *p,
return WERR_SPL_NO_STARTDOC;
}
- errcode = print_job_delete(p->server_info, snum, Printer->jobid);
+ errcode = print_job_delete(p->server_info, p->msg_ctx, snum,
+ Printer->jobid);
return errcode;
}
@@ -6684,7 +6685,7 @@ WERROR _spoolss_SetJob(struct pipes_struct *p,
switch (r->in.command) {
case SPOOLSS_JOB_CONTROL_CANCEL:
case SPOOLSS_JOB_CONTROL_DELETE:
- errcode = print_job_delete(p->server_info,
+ errcode = print_job_delete(p->server_info, p->msg_ctx,
snum, r->in.job_id);
if (W_ERROR_EQUAL(errcode, WERR_PRINTER_HAS_JOBS_QUEUED)) {
errcode = WERR_OK;