summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c4
-rw-r--r--source3/rpc_server/srv_spoolss_util.c3
-rw-r--r--source3/rpc_server/srv_spoolss_util.h1
3 files changed, 6 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 31dca0458a..06c1e55f0d 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -381,7 +381,7 @@ static WERROR delete_printer_handle(struct pipes_struct *p, struct policy_handle
done on the handle already */
result = winreg_delete_printer_key(p->mem_ctx, p->server_info,
- Printer->sharename, "");
+ p->msg_ctx, Printer->sharename, "");
if (!W_ERROR_IS_OK(result)) {
DEBUG(3,("Error deleting printer %s\n", Printer->sharename));
return WERR_BADFID;
@@ -1764,6 +1764,7 @@ WERROR _spoolss_DeletePrinter(struct pipes_struct *p,
if (get_printer_snum(p, r->in.handle, &snum, NULL)) {
winreg_delete_printer_key(p->mem_ctx,
p->server_info,
+ p->msg_ctx,
lp_const_servicename(snum),
"");
}
@@ -8953,6 +8954,7 @@ WERROR _spoolss_DeletePrinterKey(struct pipes_struct *p,
/* delete the key and all subkeys */
status = winreg_delete_printer_key(p->mem_ctx,
p->server_info,
+ p->msg_ctx,
printer,
r->in.key_name);
if (W_ERROR_IS_OK(status)) {
diff --git a/source3/rpc_server/srv_spoolss_util.c b/source3/rpc_server/srv_spoolss_util.c
index 22c6ad0d5f..3eaa759798 100644
--- a/source3/rpc_server/srv_spoolss_util.c
+++ b/source3/rpc_server/srv_spoolss_util.c
@@ -2990,6 +2990,7 @@ done:
/* Delete a key with subkeys of a given printer. */
WERROR winreg_delete_printer_key(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
const char *printer,
const char *key)
{
@@ -3014,7 +3015,7 @@ WERROR winreg_delete_printer_key(TALLOC_CTX *mem_ctx,
result = winreg_printer_openkey(tmp_ctx,
server_info,
- smbd_messaging_context(),
+ msg_ctx,
&winreg_pipe,
path,
key,
diff --git a/source3/rpc_server/srv_spoolss_util.h b/source3/rpc_server/srv_spoolss_util.h
index e2abf00486..2283624ef8 100644
--- a/source3/rpc_server/srv_spoolss_util.h
+++ b/source3/rpc_server/srv_spoolss_util.h
@@ -340,6 +340,7 @@ WERROR winreg_enum_printer_key(TALLOC_CTX *mem_ctx,
*/
WERROR winreg_delete_printer_key(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
const char *printer,
const char *key);