summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-07-28 11:36:50 +0200
committerAndreas Schneider <asn@cryptomilk.org>2011-07-28 16:20:11 +0200
commita97fef36bccb856c9a6b7e1630f20dd3c394442e (patch)
treed7d81a331760007e22bf4a250984b1fd93220f0b /source3
parent5fa9fe39ea30c210bfb2ab10cfc796ec4b521f78 (diff)
downloadsamba-a97fef36bccb856c9a6b7e1630f20dd3c394442e.tar.gz
samba-a97fef36bccb856c9a6b7e1630f20dd3c394442e.tar.bz2
samba-a97fef36bccb856c9a6b7e1630f20dd3c394442e.zip
s3-spoolss: Use existing handle in printer_driver_files_in_use().
Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Thu Jul 28 16:20:11 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3')
-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);