From 002d1a44672c9b3247a68a86899ce6644b696a48 Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Wed, 29 May 2013 10:43:33 +0200 Subject: 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 Reviewed-by: Andreas Schneider --- source3/include/nt_printing.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source3/include/nt_printing.h') diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h index 2243a3d095..2a0e8835df 100644 --- a/source3/include/nt_printing.h +++ b/source3/include/nt_printing.h @@ -132,6 +132,11 @@ bool print_access_check(const struct auth_session_info *server_info, struct messaging_context *msg_ctx, int snum, int access_type); +WERROR nt_printer_guid_get(TALLOC_CTX *mem_ctx, + const struct auth_session_info *session_info, + struct messaging_context *msg_ctx, + const char *printer, struct GUID *guid); + WERROR nt_printer_publish(TALLOC_CTX *mem_ctx, const struct auth_session_info *server_info, struct messaging_context *msg_ctx, @@ -143,7 +148,6 @@ bool is_printer_published(TALLOC_CTX *mem_ctx, struct messaging_context *msg_ctx, const char *servername, const char *printer, - struct GUID *guid, struct spoolss_PrinterInfo2 **info2); WERROR check_published_printers(struct messaging_context *msg_ctx); -- cgit