spoolss: fix DPD_DELETE_ALL_FILES error return
authorDavid Disseldorp <ddiss@samba.org>
Tue, 10 Jan 2012 17:21:42 +0000 (18:21 +0100)
committerDavid Disseldorp <ddiss@samba.org>
Wed, 11 Jan 2012 12:56:44 +0000 (13:56 +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 87df5659c7819d9984b382065e37734c9bf38bcc..7a51703c01918ff0362945a4dbc5b521984fadb8 100644 (file)
@@ -2272,8 +2272,7 @@ WERROR _spoolss_DeletePrinterDriverEx(struct pipes_struct *p,
            printer_driver_files_in_use(tmp_ctx,
                                        b,
                                        info)) {
-               /* no idea of the correct error here */
-               status = WERR_ACCESS_DENIED;
+               status = WERR_PRINTER_DRIVER_IN_USE;
                goto done;
        }