]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r2079: Clear the publish-bit from the attributes-mask when migrating
authorGünther Deschner <gd@samba.org>
Thu, 26 Aug 2004 21:32:49 +0000 (21:32 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:52:30 +0000 (10:52 -0500)
printer-settings. publishing-info is not handled yet.

Guenther

source/utils/net_rpc_printer.c

index d43b2ed94cfe325fac9eb7f10a7b07afea7e0b2f..b414b38a79d6837bda264e4cf3c624d9cf04d9e2 100644 (file)
@@ -2095,6 +2095,12 @@ NTSTATUS rpc_printer_migrate_settings_internals(const DOM_SID *domain_sid, const
                   is correctly installed (incl. driver ???) */
                init_unistr( &ctr_dst.printers_2->portname, SAMBA_PRINTER_PORT_NAME);
 
+               /* check if printer is published -> no publish-migration for the moment */
+               if (ctr_enum.printers_2[i].attributes & PRINTER_ATTRIBUTE_PUBLISHED) {
+                       printf("printer on originating server was published, ignoring that\n");
+                       ctr_dst.printers_2->attributes = PRINTER_ATTRIBUTE_SAMBA;
+               }
+
                /* copy devmode (info level 2) */
                ctr_dst.printers_2->devmode = talloc_memdup(mem_ctx, 
                        ctr_enum.printers_2[i].devmode, sizeof(DEVICEMODE));