mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s3-rpcclient: Fix bug #7880: cmd_spoolss_deletedriver() returned without checking all architectures.
Continues now with next architecture if no driver is available. Because of the broken behavior of the rpccli_*() functions, we need special error code handling. Signed-off-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
dac7ccee9f
commit
f5af66e67d
@ -1945,6 +1945,8 @@ static WERROR cmd_spoolss_deletedriver(struct rpc_pipe_client *cli,
|
||||
|
||||
/* delete the driver for all architectures */
|
||||
for (i=0; archi_table[i].long_archi; i++) {
|
||||
result = WERR_OK;
|
||||
|
||||
/* make the call to remove the driver */
|
||||
status = rpccli_spoolss_DeletePrinterDriver(cli, mem_ctx,
|
||||
cli->srv_name_slash,
|
||||
@ -1952,7 +1954,9 @@ static WERROR cmd_spoolss_deletedriver(struct rpc_pipe_client *cli,
|
||||
argv[1],
|
||||
&result);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
return result;
|
||||
if (W_ERROR_IS_OK(result)) {
|
||||
result = ntstatus_to_werror(status);
|
||||
}
|
||||
}
|
||||
if ( !W_ERROR_IS_OK(result) ) {
|
||||
if ( !W_ERROR_EQUAL(result, WERR_UNKNOWN_PRINTER_DRIVER) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user