2 * Unix SMB/CIFS implementation.
4 * SPOOLSS RPC Pipe server / winreg client routines
6 * Copyright (c) 2010 Andreas Schneider <asn@samba.org>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, see <http://www.gnu.org/licenses/>.
23 #include "rpc_server/rpc_ncacn_np.h"
24 #include "srv_spoolss_util.h"
25 #include "../librpc/gen_ndr/ndr_winreg.h"
27 WERROR winreg_printer_binding_handle(TALLOC_CTX *mem_ctx,
28 const struct auth_serversupplied_info *session_info,
29 struct messaging_context *msg_ctx,
30 struct dcerpc_binding_handle **winreg_binding_handle)
32 static struct client_address client_id;
35 strlcpy(client_id.addr, "127.0.0.1", sizeof(client_id.addr));
36 client_id.name = "127.0.0.1";
38 status = rpcint_binding_handle(mem_ctx,
43 winreg_binding_handle);
44 if (!NT_STATUS_IS_OK(status)) {
45 DEBUG(0, ("winreg_printer_binding_handle: Could not connect to winreg pipe: %s\n",
47 return ntstatus_to_werror(status);