summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2010-04-26 18:50:44 -0400
committerSimo Sorce <idra@samba.org>2010-07-27 10:27:10 -0400
commita1fe2ed68aef71083dc6a9938440e32e5a0cf63c (patch)
tree302c14b90ef5ae2a5ac807cd737155eb06ea7f1c /source3/rpc_server
parentfdf669d37744487a7671b1d90541dbc21a41aeb6 (diff)
downloadsamba-a1fe2ed68aef71083dc6a9938440e32e5a0cf63c.tar.gz
samba-a1fe2ed68aef71083dc6a9938440e32e5a0cf63c.tar.bz2
samba-a1fe2ed68aef71083dc6a9938440e32e5a0cf63c.zip
s3-spoolss: Use winreg_delete_printer_key to delete printers.
Signed-off-by: Jim McDonough <jmcd@samba.org>
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 07e541d37f..2967fe11e2 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -336,6 +336,7 @@ static WERROR delete_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, const c
static WERROR delete_printer_handle(pipes_struct *p, struct policy_handle *hnd)
{
Printer_entry *Printer = find_printer_index_by_hnd(p, hnd);
+ WERROR result;
if (!Printer) {
DEBUG(2,("delete_printer_handle: Invalid handle (%s:%u:%u)\n",
@@ -358,7 +359,9 @@ static WERROR delete_printer_handle(pipes_struct *p, struct policy_handle *hnd)
/* this does not need a become root since the access check has been
done on the handle already */
- if (del_a_printer( Printer->sharename ) != 0) {
+ result = winreg_delete_printer_key(p->mem_ctx, p->server_info,
+ Printer->sharename, "");
+ if (!W_ERROR_IS_OK(result)) {
DEBUG(3,("Error deleting printer %s\n", Printer->sharename));
return WERR_BADFID;
}