summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-08 10:29:50 +0200
committerVolker Lendecke <vl@samba.org>2010-08-08 16:03:17 +0200
commit747f5c531862ba3f06f1b8c54eed5c01e549efc8 (patch)
tree1a628f44317c60c3ffa2a9904c76409f3612494d
parent3ccdbc4119ca50b4a745b820f05f0a0f0965e827 (diff)
downloadsamba-747f5c531862ba3f06f1b8c54eed5c01e549efc8.tar.gz
samba-747f5c531862ba3f06f1b8c54eed5c01e549efc8.tar.bz2
samba-747f5c531862ba3f06f1b8c54eed5c01e549efc8.zip
s3: Lift the smbd_messaging_context from winreg_delete_printer_key
-rw-r--r--source3/printing/nt_printing.c4
-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
4 files changed, 9 insertions, 3 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 72a57a7df7..29d5bd3e05 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -2206,7 +2206,9 @@ void nt_printer_remove(TALLOC_CTX *mem_ctx,
{
WERROR result;
- result = winreg_delete_printer_key(mem_ctx, server_info, printer, "");
+ result = winreg_delete_printer_key(mem_ctx, server_info,
+ smbd_messaging_context(),
+ printer, "");
if (!W_ERROR_IS_OK(result)) {
DEBUG(0, ("nt_printer_remove: failed to remove rpinter %s",
printer));
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);