summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpcclient')
-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 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;