summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-11-17 10:56:32 +0100
committerGünther Deschner <gd@samba.org>2009-02-07 01:52:29 +0100
commitf5a24b71b930a6906af5f357de5d0be34f1dead2 (patch)
tree429bfd94027d1d60a6b05f0ab3d0a29b5758cb26 /source3/rpc_server
parentb56c5bf5105ef3ddb1dd7525476323d2f503e59e (diff)
downloadsamba-f5a24b71b930a6906af5f357de5d0be34f1dead2.tar.gz
samba-f5a24b71b930a6906af5f357de5d0be34f1dead2.tar.bz2
samba-f5a24b71b930a6906af5f357de5d0be34f1dead2.zip
s3-spoolss: use pidl for _spoolss_DeleteForm.
Guenther
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_spoolss.c22
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c34
2 files changed, 14 insertions, 42 deletions
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index 0e4e73b27d..4e86e19687 100644
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -975,27 +975,7 @@ static bool api_spoolss_addform(pipes_struct *p)
static bool api_spoolss_deleteform(pipes_struct *p)
{
- SPOOL_Q_DELETEFORM q_u;
- SPOOL_R_DELETEFORM r_u;
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
-
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
-
- if(!spoolss_io_q_deleteform("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_deleteform: unable to unmarshall SPOOL_Q_DELETEFORM.\n"));
- return False;
- }
-
- r_u.status = _spoolss_deleteform(p, &q_u, &r_u);
-
- if(!spoolss_io_r_deleteform("", &r_u, rdata, 0)) {
- DEBUG(0,("spoolss_io_r_deleteform: unable to marshall SPOOL_R_DELETEFORM.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_DELETEFORM);
}
/****************************************************************************
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 48775a8df5..2643fe61ed 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -8519,13 +8519,15 @@ done:
return status;
}
-/****************************************************************************
-****************************************************************************/
+/****************************************************************
+ _spoolss_DeleteForm
+****************************************************************/
-WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DELETEFORM *r_u)
+WERROR _spoolss_DeleteForm(pipes_struct *p,
+ struct spoolss_DeleteForm *r)
{
- POLICY_HND *handle = &q_u->handle;
- UNISTR2 *form_name = &q_u->name;
+ POLICY_HND *handle = r->in.handle;
+ const char *form_name = r->in.form_name;
nt_forms_struct tmpForm;
int count=0;
nt_forms_struct *list=NULL;
@@ -8534,10 +8536,11 @@ WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DE
WERROR status = WERR_OK;
NT_PRINTER_INFO_LEVEL *printer = NULL;
- DEBUG(5,("spoolss_deleteform\n"));
+ DEBUG(5,("_spoolss_DeleteForm\n"));
if (!Printer) {
- DEBUG(2,("_spoolss_deleteform: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle)));
+ DEBUG(2,("_spoolss_DeleteForm: Invalid handle (%s:%u:%u).\n",
+ OUR_HANDLE(handle)));
return WERR_BADFID;
}
@@ -8554,21 +8557,21 @@ WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DE
}
if ( !(Printer->access_granted & (PRINTER_ACCESS_ADMINISTER|SERVER_ACCESS_ADMINISTER)) ) {
- DEBUG(2,("_spoolss_deleteform: denied by handle permissions.\n"));
+ DEBUG(2,("_spoolss_DeleteForm: denied by handle permissions.\n"));
status = WERR_ACCESS_DENIED;
goto done;
}
/* can't delete if builtin */
- if (get_a_builtin_ntform(form_name,&tmpForm)) {
+ if (get_a_builtin_ntform_by_string(form_name,&tmpForm)) {
status = WERR_INVALID_PARAM;
goto done;
}
count = get_ntforms(&list);
- if ( !delete_a_form(&list, form_name, &count, &status ))
+ if ( !delete_a_form_by_string(&list, form_name, &count, &status ))
goto done;
/*
@@ -10222,17 +10225,6 @@ WERROR _spoolss_AddForm(pipes_struct *p,
}
/****************************************************************
- _spoolss_DeleteForm
-****************************************************************/
-
-WERROR _spoolss_DeleteForm(pipes_struct *p,
- struct spoolss_DeleteForm *r)
-{
- p->rng_fault_state = true;
- return WERR_NOT_SUPPORTED;
-}
-
-/****************************************************************
_spoolss_GetForm
****************************************************************/