summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/proto.h4
-rw-r--r--source3/rpc_client/cli_spoolss.c25
-rw-r--r--source3/rpc_parse/parse_spoolss.c12
-rw-r--r--source3/rpcclient/cmd_spoolss.c9
4 files changed, 8 insertions, 42 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 3aad31319b..aae8dbfd54 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5475,8 +5475,6 @@ WERROR rpccli_spoolss_setform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
WERROR rpccli_spoolss_getform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *handle, const char *formname,
uint32 level, FORM_1 *form);
-WERROR rpccli_spoolss_deleteform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *handle, const char *form_name);
WERROR rpccli_spoolss_enumforms(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *handle, int level, uint32 *num_forms,
FORM_1 **forms);
@@ -6116,8 +6114,6 @@ bool make_spoolss_q_addform(SPOOL_Q_ADDFORM *q_u, POLICY_HND *handle,
int level, FORM *form);
bool make_spoolss_q_setform(SPOOL_Q_SETFORM *q_u, POLICY_HND *handle,
int level, const char *form_name, FORM *form);
-bool make_spoolss_q_deleteform(SPOOL_Q_DELETEFORM *q_u, POLICY_HND *handle,
- const char *form);
bool make_spoolss_q_getform(SPOOL_Q_GETFORM *q_u, POLICY_HND *handle,
const char *formname, uint32 level,
RPC_BUFFER *buffer, uint32 offered);
diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c
index dcf4954ee4..d42931570d 100644
--- a/source3/rpc_client/cli_spoolss.c
+++ b/source3/rpc_client/cli_spoolss.c
@@ -1261,31 +1261,6 @@ WERROR rpccli_spoolss_getform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
/**********************************************************************
**********************************************************************/
-WERROR rpccli_spoolss_deleteform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *handle, const char *form_name)
-{
- prs_struct qbuf, rbuf;
- SPOOL_Q_DELETEFORM in;
- SPOOL_R_DELETEFORM out;
-
- ZERO_STRUCT(in);
- ZERO_STRUCT(out);
-
- make_spoolss_q_deleteform( &in, handle, form_name );
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_DELETEFORM,
- in, out,
- qbuf, rbuf,
- spoolss_io_q_deleteform,
- spoolss_io_r_deleteform,
- WERR_GENERAL_FAILURE );
-
- return out.status;
-}
-
-/**********************************************************************
-**********************************************************************/
-
WERROR rpccli_spoolss_enumforms(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *handle, int level, uint32 *num_forms,
FORM_1 **forms)
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index 9d2a7ef4de..0a773967b2 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -7083,18 +7083,6 @@ bool make_spoolss_q_setform(SPOOL_Q_SETFORM *q_u, POLICY_HND *handle,
* init a structure.
********************************************************************/
-bool make_spoolss_q_deleteform(SPOOL_Q_DELETEFORM *q_u, POLICY_HND *handle,
- const char *form)
-{
- memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
- init_unistr2(&q_u->name, form, UNI_STR_TERMINATE);
- return True;
-}
-
-/*******************************************************************
- * init a structure.
- ********************************************************************/
-
bool make_spoolss_q_getform(SPOOL_Q_GETFORM *q_u, POLICY_HND *handle,
const char *formname, uint32 level,
RPC_BUFFER *buffer, uint32 offered)
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 057fc25123..8003180fda 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -1869,6 +1869,7 @@ static WERROR cmd_spoolss_deleteform(struct rpc_pipe_client *cli,
{
POLICY_HND handle;
WERROR werror;
+ NTSTATUS status;
char *servername = NULL, *printername = NULL;
bool got_handle = False;
@@ -1901,7 +1902,13 @@ static WERROR cmd_spoolss_deleteform(struct rpc_pipe_client *cli,
/* Delete the form */
- werror = rpccli_spoolss_deleteform(cli, mem_ctx, &handle, argv[2]);
+ status = rpccli_spoolss_DeleteForm(cli, mem_ctx,
+ &handle,
+ argv[2],
+ &werror);
+ if (!NT_STATUS_IS_OK(status)) {
+ return ntstatus_to_werror(status);
+ }
done:
if (got_handle)