diff options
-rw-r--r-- | source3/include/nt_printing.h | 1 | ||||
-rw-r--r-- | source3/printing/nt_printing.c | 4 | ||||
-rw-r--r-- | source3/printing/printing.c | 3 |
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; |