summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-12-09 15:49:46 +0100
committerKarolin Seeger <kseeger@samba.org>2009-12-15 08:16:49 +0100
commit3a29aab1e0db7f4f352a2204c11890a986c38dce (patch)
treee156b8df0e12ebfba5ba3b878630badb81d1ac56
parent22f30db8d006ccb0610ce0a4473d9266bfaf1080 (diff)
downloadsamba-3a29aab1e0db7f4f352a2204c11890a986c38dce.tar.gz
samba-3a29aab1e0db7f4f352a2204c11890a986c38dce.tar.xz
samba-3a29aab1e0db7f4f352a2204c11890a986c38dce.zip
s3-rpcclient: allow to set offered size for enumkey command.
Guenther (cherry picked from commit c2618d2c6f8657c30cd0f68777d3f37e64172191) (cherry picked from commit ee7944ed987bd0e4dc1315ffcac09fd2fd37bfe9)
-rw-r--r--source3/rpcclient/cmd_spoolss.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 5393ba75a99..6101fc651d9 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -2906,18 +2906,23 @@ static WERROR cmd_spoolss_enum_printerkey(struct rpc_pipe_client *cli,
struct policy_handle hnd;
const char **key_buffer = NULL;
int i;
+ uint32_t offered = 0;
- if (argc < 2 || argc > 3) {
- printf("Usage: %s printername [keyname]\n", argv[0]);
+ if (argc < 2 || argc > 4) {
+ printf("Usage: %s printername [keyname] [offered]\n", argv[0]);
return WERR_OK;
}
- if (argc == 3) {
+ if (argc >= 3) {
keyname = argv[2];
} else {
keyname = "";
}
+ if (argc == 4) {
+ offered = atoi(argv[3]);
+ }
+
/* Open printer handle */
RPCCLIENT_PRINTERNAME(printername, cli, argv[1]);
@@ -2936,7 +2941,7 @@ static WERROR cmd_spoolss_enum_printerkey(struct rpc_pipe_client *cli,
&hnd,
keyname,
&key_buffer,
- 0);
+ offered);
if (!W_ERROR_IS_OK(result)) {
goto done;