diff options
author | Tim Potter <tpot@samba.org> | 2002-09-09 03:22:39 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-09-09 03:22:39 +0000 |
commit | 18c3436f9d22b259aa1ee1ed40265a2d33a660fb (patch) | |
tree | 0739eeadc3cf774b8d4007cef7b520bf111f9a3a /source3/rpc_client | |
parent | 1f919364f48a35dfd52d825e394a5a9462b1806e (diff) | |
download | samba-18c3436f9d22b259aa1ee1ed40265a2d33a660fb.tar.gz samba-18c3436f9d22b259aa1ee1ed40265a2d33a660fb.tar.bz2 samba-18c3436f9d22b259aa1ee1ed40265a2d33a660fb.zip |
Return WERR_UNKNOWN_LEVEL for unknown info levels.
(This used to be commit d30da51956accfc4ea4662cece00d4df223421cd)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_spoolss.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c index 448dc7ece5..ca24d95e33 100644 --- a/source3/rpc_client/cli_spoolss.c +++ b/source3/rpc_client/cli_spoolss.c @@ -661,7 +661,8 @@ WERROR cli_spoolss_setprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - make_spoolss_q_setprinter(mem_ctx, &q, pol, level, ctr, command); + if (!make_spoolss_q_setprinter(mem_ctx, &q, pol, level, ctr, command)) + goto done; /* Marshall data and send request */ @@ -1335,8 +1336,16 @@ WERROR cli_spoolss_getform(struct cli_state *cli, TALLOC_CTX *mem_ctx, if (needed) *needed = r.needed; - if (W_ERROR_IS_OK(result)) - smb_io_form_1("", r.buffer, form, 0); + if (W_ERROR_IS_OK(result)) { + switch(level) { + case 1: + smb_io_form_1("", r.buffer, form, 0); + break; + default: + DEBUG(10, ("cli_spoolss_getform: unknown info level %d", level)); + return WERR_UNKNOWN_LEVEL; + } + } done: prs_mem_free(&qbuf); |