From b9475e88deaa0626e9d302c7559308b707a96229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Deschner?= Date: Sat, 10 Sep 2016 11:09:44 +0200 Subject: [PATCH] s3-spoolss: use server sd stored in the backend in _spoolss_GetPrinter level 3 Guenther Signed-off-by: Guenther Deschner Reviewed-by: Stefan Metzmacher --- source3/rpc_server/spoolss/srv_spoolss_nt.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c index 743918df743..f3310eeb9d7 100644 --- a/source3/rpc_server/spoolss/srv_spoolss_nt.c +++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c @@ -4805,12 +4805,24 @@ WERROR _spoolss_GetPrinter(struct pipes_struct *p, } if (Printer->printer_type == SPLHND_SERVER) { + + struct dcerpc_binding_handle *b; + if (r->in.level != 3) { result = WERR_UNKNOWN_LEVEL; goto err_info_free; } - result = spoolss_create_default_secdesc(p->mem_ctx, + result = winreg_printer_binding_handle(p->mem_ctx, + get_session_info_system(), + p->msg_ctx, + &b); + if (!W_ERROR_IS_OK(result)) { + goto err_info_free; + } + + result = winreg_get_printserver_secdesc(p->mem_ctx, + b, &r->out.info->info3.secdesc); if (!W_ERROR_IS_OK(result)) { goto err_info_free;