s3-printing: remove tdb migration invalid printer name checks
authorDavid Disseldorp <ddiss@suse.de>
Tue, 5 Jul 2011 13:04:02 +0000 (15:04 +0200)
committerGünther Deschner <gd@samba.org>
Thu, 7 Jul 2011 17:15:34 +0000 (19:15 +0200)
WERR_INVALID_PRINTER_NAME only needed to be handled when printing tdb
migration used spoolss, with winreg such errors are no longer possible.

Signed-off-by: Günther Deschner <gd@samba.org>
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Jul  7 19:15:34 CEST 2011 on sn-devel-104

source3/printing/nt_printing_migrate_internal.c

index 1bd6158..33002e0 100644 (file)
@@ -132,12 +132,7 @@ static NTSTATUS migrate_internal(TALLOC_CTX *mem_ctx,
                                                 dbuf.dptr,
                                                 dbuf.dsize);
                        SAFE_FREE(dbuf.dptr);
-                       /* currently no WERR_INVALID_PRINTER_NAME equivalent */
-                       if (NT_STATUS_EQUAL(status,
-                              werror_to_ntstatus(WERR_INVALID_PRINTER_NAME))) {
-                               DEBUG(2, ("Skipping migration for non-existent "
-                                               "printer: %s\n", printer_name));
-                       } else if (!NT_STATUS_IS_OK(status)) {
+                       if (!NT_STATUS_IS_OK(status)) {
                                tdb_close(tdb);
                                return status;
                        }
@@ -164,9 +159,7 @@ static NTSTATUS migrate_internal(TALLOC_CTX *mem_ctx,
                                                 dbuf.dptr,
                                                 dbuf.dsize);
                        SAFE_FREE(dbuf.dptr);
-                       /* currently no WERR_INVALID_PRINTER_NAME equivalent */
-                       if (NT_STATUS_EQUAL(status, werror_to_ntstatus(WERR_INVALID_PRINTER_NAME)) ||
-                           NT_STATUS_EQUAL(status, werror_to_ntstatus(WERR_BADFILE))) {
+                       if (NT_STATUS_EQUAL(status, werror_to_ntstatus(WERR_BADFILE))) {
                                DEBUG(2, ("Skipping secdesc migration for non-existent "
                                                "printer: %s\n", secdesc_name));
                        } else if (!NT_STATUS_IS_OK(status)) {