diff options
author | Andreas Schneider <asn@samba.org> | 2011-06-07 17:21:28 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-07-04 18:27:58 +1000 |
commit | 541f3cf639699d23b9a96e6c615027a5be4581a9 (patch) | |
tree | b57974dfd0ba9ef1ce19c506e382ca1a1eac2381 /source3/rpc_server/spoolss | |
parent | 6ac68a803e79984e8d3c065b7b366da0bdd495d6 (diff) | |
download | samba-541f3cf639699d23b9a96e6c615027a5be4581a9.tar.gz samba-541f3cf639699d23b9a96e6c615027a5be4581a9.tar.bz2 samba-541f3cf639699d23b9a96e6c615027a5be4581a9.zip |
s3-rpc_server: Migrate rpc function to tsocket_address.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/rpc_server/spoolss')
-rw-r--r-- | source3/rpc_server/spoolss/srv_spoolss_util.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/source3/rpc_server/spoolss/srv_spoolss_util.c b/source3/rpc_server/spoolss/srv_spoolss_util.c index 5201571a37..acf2b40397 100644 --- a/source3/rpc_server/spoolss/srv_spoolss_util.c +++ b/source3/rpc_server/spoolss/srv_spoolss_util.c @@ -30,6 +30,7 @@ #include "../libcli/security/security.h" #include "rpc_client/cli_winreg.h" #include "../libcli/registry/util_reg.h" +#include "../lib/tsocket/tsocket.h" #define TOP_LEVEL_PRINT_KEY "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Print" #define TOP_LEVEL_PRINT_PRINTERS_KEY TOP_LEVEL_PRINT_KEY "\\Printers" @@ -255,19 +256,26 @@ static WERROR winreg_printer_openkey(TALLOC_CTX *mem_ctx, struct policy_handle *hive_handle, struct policy_handle *key_handle) { - static struct client_address client_id; + struct tsocket_address *local; struct dcerpc_binding_handle *binding_handle; struct winreg_String wkey, wkeyclass; char *keyname; NTSTATUS status; WERROR result = WERR_OK; + int rc; - strlcpy(client_id.addr, "127.0.0.1", sizeof(client_id.addr)); - client_id.name = "127.0.0.1"; + rc = tsocket_address_inet_from_strings(mem_ctx, + "ip", + "127.0.0.1", + 0, + &local); + if (rc < 0) { + return WERR_NOMEM; + } status = rpcint_binding_handle(mem_ctx, &ndr_table_winreg, - &client_id, + local, session_info, msg_ctx, &binding_handle); |