diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_server/srv_spoolss_util.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_spoolss_util.c b/source3/rpc_server/srv_spoolss_util.c index efe3dd4e97..00a9820962 100644 --- a/source3/rpc_server/srv_spoolss_util.c +++ b/source3/rpc_server/srv_spoolss_util.c @@ -1522,6 +1522,11 @@ WERROR winreg_printer_deleteform1(TALLOC_CTX *mem_ctx, wvalue, &result); if (!NT_STATUS_IS_OK(status)) { + /* If the value doesn't exist, return WERR_INVALID_FORM_NAME */ + if (W_ERROR_EQUAL(result, WERR_BADFILE)) { + result = WERR_INVALID_FORM_NAME; + goto done; + } DEBUG(0, ("winreg_printer_delteform1: Could not delete value %s: %s\n", wvalue.name, nt_errstr(status))); if (!W_ERROR_IS_OK(result)) { |