s3-spoolss: Fix bug #8351 forms migration.
authorAndreas Schneider <asn@samba.org>
Tue, 6 Sep 2011 12:09:47 +0000 (14:09 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 15 Sep 2011 18:44:03 +0000 (20:44 +0200)
Don't fail if the form already exists (or is builtin now).

Signed-off-by: Andreas Schneider <asn@samba.org>
source3/printing/nt_printing_migrate.c

index 9320448fd4a799b512debb49be77683f6e412edc..e927a233a1c16f54cd2bb5728fa04db9cefc501b 100644 (file)
@@ -73,6 +73,10 @@ NTSTATUS printing_tdb_migrate_form(TALLOC_CTX *mem_ctx,
        result = winreg_printer_addform1(mem_ctx,
                                         b,
                                         &f1);
+       if (W_ERROR_EQUAL(result, WERR_FILE_EXISTS)) {
+               /* Don't migrate form if it already exists. */
+               result = WERR_OK;
+       }
        if (!W_ERROR_IS_OK(result)) {
                return werror_to_ntstatus(result);
        }