diff options
-rw-r--r-- | source3/rpc_server/srv_spoolss.c | 22 | ||||
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 34 |
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 ****************************************************************/ |