1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

s3-spoolss: use server sd stored in the backend in _spoolss_GetPrinter level 3

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Günther Deschner 2016-09-10 11:09:44 +02:00
parent b78c96d878
commit b9475e88de

View File

@ -4805,12 +4805,24 @@ WERROR _spoolss_GetPrinter(struct pipes_struct *p,
} }
if (Printer->printer_type == SPLHND_SERVER) { if (Printer->printer_type == SPLHND_SERVER) {
struct dcerpc_binding_handle *b;
if (r->in.level != 3) { if (r->in.level != 3) {
result = WERR_UNKNOWN_LEVEL; result = WERR_UNKNOWN_LEVEL;
goto err_info_free; 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); &r->out.info->info3.secdesc);
if (!W_ERROR_IS_OK(result)) { if (!W_ERROR_IS_OK(result)) {
goto err_info_free; goto err_info_free;