diff options
author | Günther Deschner <gd@samba.org> | 2009-03-20 14:47:13 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-03-20 17:20:32 +0100 |
commit | c9a388348a2d4b276448b6a7bfc8c575b99f8eb7 (patch) | |
tree | f5fb4e5ad09186e971480de8a6d9a9d0c1e8e75c | |
parent | 2de464a7658f91d2d01087080b984d52c3483426 (diff) | |
download | samba-c9a388348a2d4b276448b6a7bfc8c575b99f8eb7.tar.gz samba-c9a388348a2d4b276448b6a7bfc8c575b99f8eb7.tar.bz2 samba-c9a388348a2d4b276448b6a7bfc8c575b99f8eb7.zip |
s3-rpcclient: allow to set flags in enumprinters command.
Guenther
-rw-r--r-- | source3/rpcclient/cmd_spoolss.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index 18c0790569..c9c457b364 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -257,9 +257,10 @@ static WERROR cmd_spoolss_enum_printers(struct rpc_pipe_client *cli, union spoolss_PrinterInfo *info; uint32_t i, count; const char *name; + uint32_t flags = PRINTER_ENUM_LOCAL; - if (argc > 3) { - printf("Usage: %s [level] [name]\n", argv[0]); + if (argc > 4) { + printf("Usage: %s [level] [name] [flags]\n", argv[0]); return WERR_OK; } @@ -267,14 +268,18 @@ static WERROR cmd_spoolss_enum_printers(struct rpc_pipe_client *cli, level = atoi(argv[1]); } - if (argc == 3) { + if (argc >= 3) { name = argv[2]; } else { name = cli->srv_name_slash; } + if (argc == 4) { + flags = atoi(argv[3]); + } + result = rpccli_spoolss_enumprinters(cli, mem_ctx, - PRINTER_ENUM_LOCAL, + flags, name, level, 0, |