printing: explicitly clear PUBLISHED attribute
authorDavid Disseldorp <ddiss@samba.org>
Thu, 23 May 2013 17:32:08 +0000 (19:32 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 4 Jun 2013 07:52:26 +0000 (09:52 +0200)
Currently nt_printer_publish(DSPRINT_UNPUBLISH) flips (via xor) the
info2->attributes PRINTER_ATTRIBUTE_PUBLISHED flag, rather than
explicitly clearing it.

source3/printing/nt_printing_ads.c

index 572b5418becd2e0e0f799cc1142bd49890e22ebb..9aab88b1ce7b9c47921cd0a39fb3dd2ee9049d0f 100644 (file)
@@ -355,7 +355,7 @@ WERROR nt_printer_publish(TALLOC_CTX *mem_ctx,
                pinfo2->attributes |= PRINTER_ATTRIBUTE_PUBLISHED;
                break;
        case DSPRINT_UNPUBLISH:
-               pinfo2->attributes ^= PRINTER_ATTRIBUTE_PUBLISHED;
+               pinfo2->attributes &= (~PRINTER_ATTRIBUTE_PUBLISHED);
                break;
        default:
                win_rc = WERR_NOT_SUPPORTED;