summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-02-25 01:11:01 +0100
committerGünther Deschner <gd@samba.org>2009-02-25 11:16:29 +0100
commit109ba07b0e2ce45cc0a960bcafd0e8d28c877ae3 (patch)
tree3f314f9ad9ebdab3477110a6c59c7d2f2f52d86a /source3/rpcclient
parentf8af5130d5515e017330a2123b933109599e072c (diff)
downloadsamba-109ba07b0e2ce45cc0a960bcafd0e8d28c877ae3.tar.gz
samba-109ba07b0e2ce45cc0a960bcafd0e8d28c877ae3.tar.bz2
samba-109ba07b0e2ce45cc0a960bcafd0e8d28c877ae3.zip
s3-spoolss: use rpccli_spoolss_addprinterex wrapper.
Guenther
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_spoolss.c29
1 files changed, 2 insertions, 27 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 4e1c7f1422..ba01f7aa8b 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -1526,14 +1526,8 @@ static WERROR cmd_spoolss_addprinterex(struct rpc_pipe_client *cli,
int argc, const char **argv)
{
WERROR result;
- NTSTATUS status;
struct spoolss_SetPrinterInfoCtr info_ctr;
struct spoolss_SetPrinterInfo2 info2;
- struct policy_handle handle;
- struct spoolss_DevmodeContainer devmode_ctr;
- struct sec_desc_buf sd;
- struct spoolss_UserLevelCtr userlevel_ctr;
- struct spoolss_UserLevel1 level1;
/* parse the command arguments */
if (argc != 5)
@@ -1543,9 +1537,7 @@ static WERROR cmd_spoolss_addprinterex(struct rpc_pipe_client *cli,
}
/* Fill in the DRIVER_INFO_2 struct */
- ZERO_STRUCT(devmode_ctr);
ZERO_STRUCT(info2);
- ZERO_STRUCT(sd);
info2.printername = argv[1];
info2.drivername = argv[3];
@@ -1573,25 +1565,8 @@ static WERROR cmd_spoolss_addprinterex(struct rpc_pipe_client *cli,
info_ctr.level = 2;
info_ctr.info.info2 = &info2;
- level1.size = 28; /* wild guess */
- level1.build = 1381;
- level1.major = 2;
- level1.minor = 0;
- level1.processor = 0;
- level1.client = global_myname();
- level1.user = cli->auth->user_name;
-
- userlevel_ctr.level = 1;
- userlevel_ctr.user_info.level1 = &level1;
-
- status = rpccli_spoolss_AddPrinterEx(cli, mem_ctx,
- cli->srv_name_slash,
- &info_ctr,
- &devmode_ctr,
- &sd,
- &userlevel_ctr,
- &handle,
- &result);
+ result = rpccli_spoolss_addprinterex(cli, mem_ctx,
+ &info_ctr);
if (W_ERROR_IS_OK(result))
printf ("Printer %s successfully installed.\n", argv[1]);