summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-08 14:29:39 +0200
committerVolker Lendecke <vl@samba.org>2010-08-08 16:03:25 +0200
commit39ce462043d32e94b71a98001a43a95360017528 (patch)
tree198546e595a25ea3a10df67eeb5c22f43ac7037f /source3
parentbe7fd4ae5054435b25b1a6a460b626d556f39936 (diff)
downloadsamba-39ce462043d32e94b71a98001a43a95360017528.tar.gz
samba-39ce462043d32e94b71a98001a43a95360017528.tar.bz2
samba-39ce462043d32e94b71a98001a43a95360017528.zip
s3: Lift the smbd_messaging_context from print_time_access_check
Diffstat (limited to 'source3')
-rw-r--r--source3/include/nt_printing.h1
-rw-r--r--source3/printing/nt_printing.c4
-rw-r--r--source3/printing/printing.c3
3 files changed, 5 insertions, 3 deletions
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h
index f29b22fc42..e7e2536ce6 100644
--- a/source3/include/nt_printing.h
+++ b/source3/include/nt_printing.h
@@ -280,6 +280,7 @@ void map_printer_permissions(struct security_descriptor *sd);
void map_job_permissions(struct security_descriptor *sd);
bool print_time_access_check(struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
const char *servicename);
void nt_printer_remove(TALLOC_CTX *mem_ctx,
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 73ce7e6d45..4afddd31c2 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -2167,6 +2167,7 @@ bool print_access_check(struct auth_serversupplied_info *server_info,
*****************************************************************************/
bool print_time_access_check(struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
const char *servicename)
{
struct spoolss_PrinterInfo2 *pinfo2 = NULL;
@@ -2176,8 +2177,7 @@ bool print_time_access_check(struct auth_serversupplied_info *server_info,
struct tm *t;
uint32 mins;
- result = winreg_get_printer(NULL, server_info,
- smbd_messaging_context(),
+ result = winreg_get_printer(NULL, server_info, msg_ctx,
NULL, servicename, &pinfo2);
if (!W_ERROR_IS_OK(result)) {
return False;
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index a6f8bf069f..ec9274cb35 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -2519,7 +2519,8 @@ static WERROR print_job_checks(struct auth_serversupplied_info *server_info,
return WERR_ACCESS_DENIED;
}
- if (!print_time_access_check(server_info, sharename)) {
+ if (!print_time_access_check(server_info, smbd_messaging_context(),
+ sharename)) {
DEBUG(3, ("print_job_checks: "
"job start denied by time check\n"));
return WERR_ACCESS_DENIED;