spoolss: fix DPD_DELETE_ALL_FILES error return
authorDavid Disseldorp <ddiss@samba.org>
Tue, 10 Jan 2012 17:21:42 +0000 (18:21 +0100)
committerKarolin Seeger <kseeger@samba.org>
Mon, 23 Jan 2012 19:46:18 +0000 (20:46 +0100)
If DeletePrinterDriverEx is called with DPD_DELETE_ALL_FILES and files
assigned to the to-be-deleted driver overlap with other drivers then an
error is returned. Change the error code here to match Windows 2k8r2.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
source3/rpc_server/spoolss/srv_spoolss_nt.c

index bfec3cc183a8f90b31ea86d0a348d922f6d4279c..2403f32d9db81c1c8c2d64f1cfe425d0e04e32de 100644 (file)
@@ -2264,8 +2264,7 @@ WERROR _spoolss_DeletePrinterDriverEx(struct pipes_struct *p,
                                        get_session_info_system(),
                                        p->msg_ctx,
                                        info)) {
-               /* no idea of the correct error here */
-               status = WERR_ACCESS_DENIED;
+               status = WERR_PRINTER_DRIVER_IN_USE;
                goto done;
        }