summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/nt_printing.h3
-rw-r--r--source3/printing/nt_printing.c12
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_nt.c6
3 files changed, 4 insertions, 17 deletions
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h
index 0ac1995f53..1f13a1a8e7 100644
--- a/source3/include/nt_printing.h
+++ b/source3/include/nt_printing.h
@@ -150,8 +150,7 @@ bool printer_driver_in_use(TALLOC_CTX *mem_ctx,
struct dcerpc_binding_handle *b,
const struct spoolss_DriverInfo8 *r);
bool printer_driver_files_in_use(TALLOC_CTX *mem_ctx,
- const struct auth_session_info *server_info,
- struct messaging_context *msg_ctx,
+ struct dcerpc_binding_handle *b,
struct spoolss_DriverInfo8 *r);
bool delete_driver_files(const struct auth_session_info *server_info,
const struct spoolss_DriverInfo8 *r);
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 4eb375dddd..2ceb540e35 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -1401,8 +1401,7 @@ static bool trim_overlap_drv_files(TALLOC_CTX *mem_ctx,
****************************************************************************/
bool printer_driver_files_in_use(TALLOC_CTX *mem_ctx,
- const struct auth_session_info *session_info,
- struct messaging_context *msg_ctx,
+ struct dcerpc_binding_handle *b,
struct spoolss_DriverInfo8 *info)
{
int i;
@@ -1412,7 +1411,6 @@ bool printer_driver_files_in_use(TALLOC_CTX *mem_ctx,
uint32_t num_drivers;
const char **drivers;
WERROR result;
- struct dcerpc_binding_handle *b;
if ( !info )
return False;
@@ -1425,14 +1423,6 @@ bool printer_driver_files_in_use(TALLOC_CTX *mem_ctx,
/* get the list of drivers */
- result = winreg_printer_binding_handle(mem_ctx,
- session_info,
- msg_ctx,
- &b);
- if (!W_ERROR_IS_OK(result)) {
- return false;
- }
-
result = winreg_get_driver_list(mem_ctx, b,
info->architecture, version,
&num_drivers, &drivers);
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index 79e62c4fd3..b2200afef6 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -2284,8 +2284,7 @@ WERROR _spoolss_DeletePrinterDriverEx(struct pipes_struct *p,
if (delete_files &&
(r->in.delete_flags & DPD_DELETE_ALL_FILES) &&
printer_driver_files_in_use(tmp_ctx,
- get_session_info_system(),
- p->msg_ctx,
+ b,
info)) {
/* no idea of the correct error here */
status = WERR_ACCESS_DENIED;
@@ -2304,8 +2303,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,
- get_session_info_system(),
- p->msg_ctx,
+ b,
info_win2k)) {
/* no idea of the correct error here */
talloc_free(info_win2k);