diff options
author | Günther Deschner <gd@samba.org> | 2009-12-09 15:49:46 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-12-10 22:49:16 +0100 |
commit | c2618d2c6f8657c30cd0f68777d3f37e64172191 (patch) | |
tree | 9310a262e0dc616229e2942fa08491e9888b890f /source3/rpcclient | |
parent | dc71d1c29de521c5034fd7ebf4657610d62c2c3c (diff) | |
download | samba-c2618d2c6f8657c30cd0f68777d3f37e64172191.tar.gz samba-c2618d2c6f8657c30cd0f68777d3f37e64172191.tar.bz2 samba-c2618d2c6f8657c30cd0f68777d3f37e64172191.zip |
s3-rpcclient: allow to set offered size for enumkey command.
Guenther
Diffstat (limited to 'source3/rpcclient')
-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 5393ba75a9..6101fc651d 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; |