summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-12-07 11:28:56 +0100
committerGünther Deschner <gd@samba.org>2009-12-07 14:42:13 +0100
commitef9d6580efc55ee040458b7cd76ebdc2e1276e98 (patch)
tree65c1352fc20b0e3e84d7d88676e34d2474c820f0 /source3
parent167dca0cbf18baf40dd923f6f92421123d34b5a3 (diff)
downloadsamba-ef9d6580efc55ee040458b7cd76ebdc2e1276e98.tar.gz
samba-ef9d6580efc55ee040458b7cd76ebdc2e1276e98.tar.bz2
samba-ef9d6580efc55ee040458b7cd76ebdc2e1276e98.zip
s3-spoolss: let _spoolss_DeletePrinterData call into _spoolss_DeletePrinterDataEx.
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c43
1 files changed, 5 insertions, 38 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 73e2a74364..385ae08ebc 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -7910,46 +7910,13 @@ WERROR _spoolss_ResetPrinter(pipes_struct *p,
WERROR _spoolss_DeletePrinterData(pipes_struct *p,
struct spoolss_DeletePrinterData *r)
{
- NT_PRINTER_INFO_LEVEL *printer = NULL;
- int snum=0;
- WERROR status = WERR_OK;
- Printer_entry *Printer = find_printer_index_by_hnd(p, r->in.handle);
-
- DEBUG(5,("_spoolss_DeletePrinterData\n"));
-
- if (!Printer) {
- DEBUG(2,("_spoolss_DeletePrinterData: Invalid handle (%s:%u:%u).\n",
- OUR_HANDLE(r->in.handle)));
- return WERR_BADFID;
- }
-
- if (!get_printer_snum(p, r->in.handle, &snum, NULL))
- return WERR_BADFID;
-
- if (Printer->access_granted != PRINTER_ACCESS_ADMINISTER) {
- DEBUG(3, ("_spoolss_DeletePrinterData: "
- "printer properties change denied by handle\n"));
- return WERR_ACCESS_DENIED;
- }
+ struct spoolss_DeletePrinterDataEx r2;
- status = get_a_printer(Printer, &printer, 2, lp_const_servicename(snum));
- if (!W_ERROR_IS_OK(status))
- return status;
-
- if (!r->in.value_name) {
- free_a_printer(&printer, 2);
- return WERR_NOMEM;
- }
-
- status = delete_printer_dataex( printer, SPOOL_PRINTERDATA_KEY,
- r->in.value_name );
-
- if ( W_ERROR_IS_OK(status) )
- mod_a_printer( printer, 2 );
-
- free_a_printer(&printer, 2);
+ r2.in.handle = r->in.handle;
+ r2.in.key_name = "PrinterDriverData";
+ r2.in.value_name = r->in.value_name;
- return status;
+ return _spoolss_DeletePrinterDataEx(p, &r2);
}
/****************************************************************