Fix bug 9900: is_printer_published GUID retrieval
commit002d1a44672c9b3247a68a86899ce6644b696a48
authorDavid Disseldorp <ddiss@samba.org>
Wed, 29 May 2013 08:43:33 +0000 (29 10:43 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 3 Jun 2013 12:10:07 +0000 (3 14:10 +0200)
treecdaf881c58c59513a91d75588407c97587c8989d
parentf9b6b09e4e4e15257ce0a21caa46e26e119667d4
Fix bug 9900: is_printer_published GUID retrieval

Samba currently always responds to GetPrinter(level = 7) requests with
DSPRINT_UNPUBLISH, regardless of the AD publish status tracked via the
PRINTER_ATTRIBUTE_PUBLISHED flag. This is due to erroneous "objectGUID"
unmarshalling in is_printer_published().

This change splits "objectGUID" retrieval into a separate function, and
adds a pull_reg_sz() call to correctly unmarshall the GUID.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/include/nt_printing.h
source3/printing/nt_printing_ads.c
source3/rpc_server/spoolss/srv_spoolss_nt.c
source3/smbd/server_reload.c