From: Björn Jacke Date: Mon, 7 Sep 2020 18:09:56 +0000 (+0200) Subject: cli_winreg_spoolss: handle also printer sharename X-Git-Tag: talloc-2.3.2~475 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=787d7756b99f182cc91c4c4215b8a5657a6d25d7;p=thirdparty%2Fsamba.git cli_winreg_spoolss: handle also printer sharename BUG: https://bugzilla.samba.org/show_bug.cgi?id=9771 Signed-off-by: Bjoern Jacke Reviewed-by: Jeremy Allison --- diff --git a/source3/rpc_client/cli_winreg_spoolss.c b/source3/rpc_client/cli_winreg_spoolss.c index 7a0817a176a..3b66e20676d 100644 --- a/source3/rpc_client/cli_winreg_spoolss.c +++ b/source3/rpc_client/cli_winreg_spoolss.c @@ -857,6 +857,19 @@ WERROR winreg_create_printer(TALLOC_CTX *mem_ctx, goto done; } + status = dcerpc_winreg_set_sz(tmp_ctx, + winreg_handle, + &key_hnd, + SPOOL_REG_PRINTSHARENAME, + sharename, + &result); + if (!NT_STATUS_IS_OK(status)) { + result = ntstatus_to_werror(status); + } + if (!W_ERROR_IS_OK(result)) { + goto done; + } + status = dcerpc_winreg_set_sz(tmp_ctx, winreg_handle, &key_hnd,