s3: Lift the smbd_messaging_context from print_time_access_check
authorVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 12:29:39 +0000 (14:29 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 14:03:25 +0000 (16:03 +0200)
source3/include/nt_printing.h
source3/printing/nt_printing.c
source3/printing/printing.c

index f29b22fc4213e6d51ae6cdecb861a0e55cf8ce5d..e7e2536ce66cc96d6b08888b350c9e832a01132e 100644 (file)
@@ -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,
index 73ce7e6d45f2825f07488b22caf5bf5abd108a84..4afddd31c232bf3ad22a2e99cfeb24cc2c7d9ad1 100644 (file)
@@ -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;
index a6f8bf069f4530c7abbb2ac0708287002c4b34d2..ec9274cb350d95b338f9b473ca6cf4d01f326ad6 100644 (file)
@@ -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;