summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2010-03-31 15:31:53 +0200
committerSimo Sorce <idra@samba.org>2010-07-27 10:27:07 -0400
commit76f72fe5157cb6dd37f1beaa0ff6473bd67c6b0f (patch)
tree9af43f99ac3eee223275ea73f8a40571522517b0 /source3/rpc_server
parentfad361aa8a050e99ac64c3aae6ee292d2a538c80 (diff)
downloadsamba-76f72fe5157cb6dd37f1beaa0ff6473bd67c6b0f.tar.gz
samba-76f72fe5157cb6dd37f1beaa0ff6473bd67c6b0f.tar.bz2
samba-76f72fe5157cb6dd37f1beaa0ff6473bd67c6b0f.zip
s3-spoolss: Migrated spoolss_DeleteForm to the winreg function.
Signed-off-by: Jim McDonough <jmcd@samba.org>
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 8d02cf9135..ad4cabb77a 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -7730,15 +7730,11 @@ WERROR _spoolss_DeleteForm(pipes_struct *p,
struct spoolss_DeleteForm *r)
{
const char *form_name = r->in.form_name;
- nt_forms_struct tmpForm;
- int count=0;
- nt_forms_struct *list=NULL;
Printer_entry *Printer = find_printer_index_by_hnd(p, r->in.handle);
int snum = -1;
WERROR status = WERR_OK;
NT_PRINTER_INFO_LEVEL *printer = NULL;
SE_PRIV se_printop = SE_PRINT_OPERATOR;
- bool ret = false;
DEBUG(5,("_spoolss_DeleteForm\n"));
@@ -7771,20 +7767,10 @@ WERROR _spoolss_DeleteForm(pipes_struct *p,
return WERR_ACCESS_DENIED;
}
-
- /* can't delete if builtin */
-
- if (get_a_builtin_ntform_by_string(form_name,&tmpForm)) {
- status = WERR_INVALID_PARAM;
- goto done;
- }
-
- count = get_ntforms(&list);
-
- become_root();
- ret = delete_a_form(&list, form_name, &count, &status);
- unbecome_root();
- if (ret == false) {
+ status = winreg_printer_deleteform1(p->mem_ctx,
+ p->server_info,
+ form_name);
+ if (!W_ERROR_IS_OK(status)) {
goto done;
}
@@ -7798,7 +7784,6 @@ WERROR _spoolss_DeleteForm(pipes_struct *p,
done:
if ( printer )
free_a_printer(&printer, 2);
- SAFE_FREE(list);
return status;
}