diff options
-rw-r--r-- | source3/include/nt_printing.h | 1 | ||||
-rw-r--r-- | source3/printing/nt_printing.c | 7 | ||||
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 4 |
3 files changed, 7 insertions, 5 deletions
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h index e8a07f8c47..c3d698b71a 100644 --- a/source3/include/nt_printing.h +++ b/source3/include/nt_printing.h @@ -261,6 +261,7 @@ bool printer_driver_in_use(TALLOC_CTX *mem_ctx, const struct spoolss_DriverInfo8 *r); bool printer_driver_files_in_use(TALLOC_CTX *mem_ctx, struct auth_serversupplied_info *server_info, + struct messaging_context *msg_ctx, struct spoolss_DriverInfo8 *r); bool delete_driver_files(struct auth_serversupplied_info *server_info, const struct spoolss_DriverInfo8 *r); diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 4efc25b2c4..937cdfc6f5 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -1781,6 +1781,7 @@ static bool trim_overlap_drv_files(TALLOC_CTX *mem_ctx, bool printer_driver_files_in_use(TALLOC_CTX *mem_ctx, struct auth_serversupplied_info *server_info, + struct messaging_context *msg_ctx, struct spoolss_DriverInfo8 *info) { int i; @@ -1802,8 +1803,7 @@ bool printer_driver_files_in_use(TALLOC_CTX *mem_ctx, /* get the list of drivers */ - result = winreg_get_driver_list(mem_ctx, server_info, - smbd_messaging_context(), + result = winreg_get_driver_list(mem_ctx, server_info, msg_ctx, info->architecture, version, &num_drivers, &drivers); if (!W_ERROR_IS_OK(result)) { @@ -1820,8 +1820,7 @@ bool printer_driver_files_in_use(TALLOC_CTX *mem_ctx, driver = NULL; - result = winreg_get_driver(mem_ctx, server_info, - smbd_messaging_context(), + result = winreg_get_driver(mem_ctx, server_info, msg_ctx, info->architecture, drivers[i], version, &driver); if (!W_ERROR_IS_OK(result)) { diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 683688ad52..1acde48d44 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -1993,7 +1993,8 @@ WERROR _spoolss_DeletePrinterDriverEx(struct pipes_struct *p, if (delete_files && (r->in.delete_flags & DPD_DELETE_ALL_FILES) && - printer_driver_files_in_use(info, p->server_info, info)) { + printer_driver_files_in_use(info, p->server_info, p->msg_ctx, + info)) { /* no idea of the correct error here */ status = WERR_ACCESS_DENIED; goto done; @@ -2011,6 +2012,7 @@ WERROR _spoolss_DeletePrinterDriverEx(struct pipes_struct *p, if (delete_files && (r->in.delete_flags & DPD_DELETE_ALL_FILES) && printer_driver_files_in_use(info, p->server_info, + p->msg_ctx, info_win2k)) { /* no idea of the correct error here */ talloc_free(info_win2k); |