summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/nt_printing.c4
-rw-r--r--source3/printing/printing.c3
2 files changed, 4 insertions, 3 deletions
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;