summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_spoolss.c22
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c32
2 files changed, 13 insertions, 41 deletions
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index fa2bea5a66..d2a7a5149e 100644
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -943,27 +943,7 @@ static bool api_spoolss_deleteform(pipes_struct *p)
static bool api_spoolss_setform(pipes_struct *p)
{
- SPOOL_Q_SETFORM q_u;
- SPOOL_R_SETFORM 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_setform("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_setform: unable to unmarshall SPOOL_Q_SETFORM.\n"));
- return False;
- }
-
- r_u.status = _spoolss_setform(p, &q_u, &r_u);
-
- if(!spoolss_io_r_setform("", &r_u, rdata, 0)) {
- DEBUG(0,("spoolss_io_r_setform: unable to marshall SPOOL_R_SETFORM.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_SETFORM);
}
/****************************************************************************
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 575c4c84f4..3d9d00be2d 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -8598,13 +8598,15 @@ done:
return status;
}
-/****************************************************************************
-****************************************************************************/
+/****************************************************************
+ _spoolss_SetForm
+****************************************************************/
-WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM *r_u)
+WERROR _spoolss_SetForm(pipes_struct *p,
+ struct spoolss_SetForm *r)
{
- POLICY_HND *handle = &q_u->handle;
- FORM *form = &q_u->form;
+ POLICY_HND *handle = r->in.handle;
+ struct spoolss_AddFormInfo1 *form = r->in.info.info1;
nt_forms_struct tmpForm;
int snum;
WERROR status = WERR_OK;
@@ -8614,10 +8616,11 @@ WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM *
nt_forms_struct *list=NULL;
Printer_entry *Printer = find_printer_index_by_hnd(p, handle);
- DEBUG(5,("spoolss_setform\n"));
+ DEBUG(5,("_spoolss_SetForm\n"));
if (!Printer) {
- DEBUG(2,("_spoolss_setform: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle)));
+ DEBUG(2,("_spoolss_SetForm: Invalid handle (%s:%u:%u).\n",
+ OUR_HANDLE(handle)));
return WERR_BADFID;
}
@@ -8634,13 +8637,13 @@ WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM *
}
if ( !(Printer->access_granted & (PRINTER_ACCESS_ADMINISTER|SERVER_ACCESS_ADMINISTER)) ) {
- DEBUG(2,("_spoolss_setform: denied by handle permissions\n"));
+ DEBUG(2,("_spoolss_SetForm: denied by handle permissions\n"));
status = WERR_ACCESS_DENIED;
goto done;
}
/* can't set if builtin */
- if (get_a_builtin_ntform(&form->name,&tmpForm)) {
+ if (get_a_builtin_ntform_by_string(form->form_name, &tmpForm)) {
status = WERR_INVALID_PARAM;
goto done;
}
@@ -10223,17 +10226,6 @@ WERROR _spoolss_GetForm(pipes_struct *p,
}
/****************************************************************
- _spoolss_SetForm
-****************************************************************/
-
-WERROR _spoolss_SetForm(pipes_struct *p,
- struct spoolss_SetForm *r)
-{
- p->rng_fault_state = true;
- return WERR_NOT_SUPPORTED;
-}
-
-/****************************************************************
_spoolss_EnumForms
****************************************************************/