summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-08 14:23:12 +0200
committerVolker Lendecke <vl@samba.org>2010-08-08 16:03:24 +0200
commit862e888f71119b528d72290ad565d5a6203b4f17 (patch)
treebb18d7addef23dbaf679328989724dea3f570cee /source3
parent51c47a330257c58e8c3b5db197df07cf3bf7d9a1 (diff)
downloadsamba-862e888f71119b528d72290ad565d5a6203b4f17.tar.gz
samba-862e888f71119b528d72290ad565d5a6203b4f17.tar.bz2
samba-862e888f71119b528d72290ad565d5a6203b4f17.zip
s3: Lift the smbd_messaging_context from printer_driver_in_use
Diffstat (limited to 'source3')
-rw-r--r--source3/include/nt_printing.h1
-rw-r--r--source3/printing/nt_printing.c16
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c5
3 files changed, 11 insertions, 11 deletions
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h
index 3ac58ca339..e8a07f8c47 100644
--- a/source3/include/nt_printing.h
+++ b/source3/include/nt_printing.h
@@ -257,6 +257,7 @@ bool driver_info_ctr_to_info8(struct spoolss_AddDriverInfoCtr *r,
bool printer_driver_in_use(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
const struct spoolss_DriverInfo8 *r);
bool printer_driver_files_in_use(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *server_info,
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index a5d36dab57..4efc25b2c4 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -1553,6 +1553,7 @@ bool driver_info_ctr_to_info8(struct spoolss_AddDriverInfoCtr *r,
bool printer_driver_in_use(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
const struct spoolss_DriverInfo8 *r)
{
int snum;
@@ -1574,9 +1575,9 @@ bool printer_driver_in_use(TALLOC_CTX *mem_ctx,
continue;
}
- result = winreg_get_printer(mem_ctx, server_info,
- smbd_messaging_context(), NULL,
- lp_servicename(snum), &pinfo2);
+ result = winreg_get_printer(mem_ctx, server_info, msg_ctx,
+ NULL, lp_servicename(snum),
+ &pinfo2);
if (!W_ERROR_IS_OK(result)) {
continue; /* skip */
}
@@ -1600,21 +1601,18 @@ bool printer_driver_in_use(TALLOC_CTX *mem_ctx,
"Windows NT x86" version 2 or 3 left */
if (!strequal("Windows NT x86", r->architecture)) {
- werr = winreg_get_driver(mem_ctx, server_info,
- smbd_messaging_context(),
+ werr = winreg_get_driver(mem_ctx, server_info, msg_ctx,
"Windows NT x86",
r->driver_name,
DRIVER_ANY_VERSION,
&driver);
} else if (r->version == 2) {
- werr = winreg_get_driver(mem_ctx, server_info,
- smbd_messaging_context(),
+ werr = winreg_get_driver(mem_ctx, server_info, msg_ctx,
"Windows NT x86",
r->driver_name,
3, &driver);
} else if (r->version == 3) {
- werr = winreg_get_driver(mem_ctx, server_info,
- smbd_messaging_context(),
+ werr = winreg_get_driver(mem_ctx, server_info, msg_ctx,
"Windows NT x86",
r->driver_name,
2, &driver);
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index d6830dace6..683688ad52 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -1868,7 +1868,8 @@ WERROR _spoolss_DeletePrinterDriver(struct pipes_struct *p,
}
- if (printer_driver_in_use(p->mem_ctx, p->server_info, info)) {
+ if (printer_driver_in_use(p->mem_ctx, p->server_info, p->msg_ctx,
+ info)) {
status = WERR_PRINTER_DRIVER_IN_USE;
goto done;
}
@@ -1969,7 +1970,7 @@ WERROR _spoolss_DeletePrinterDriverEx(struct pipes_struct *p,
}
}
- if (printer_driver_in_use(info, p->server_info, info)) {
+ if (printer_driver_in_use(info, p->server_info, p->msg_ctx, info)) {
status = WERR_PRINTER_DRIVER_IN_USE;
goto done;
}