From 1130482add933d6a3e0b7f13717e0ae72588c6a2 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 17 Sep 2007 15:11:20 +0000 Subject: r25197: Change net_make_ipc_connection() and net_make_ipc_connection_ex() to return NTSTATUS to allow for better error propagation. Michael (This used to be commit 46093004a788dae83a4ddb888ca5d72f555c236c) --- source3/utils/net_rpc_join.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source3/utils/net_rpc_join.c') diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c index 1097eb9575..571d8016b9 100644 --- a/source3/utils/net_rpc_join.c +++ b/source3/utils/net_rpc_join.c @@ -64,7 +64,8 @@ int net_rpc_join_ok(const char *domain, const char *server, struct in_addr *ip ) } /* Connect to remote machine */ - if (!(cli = net_make_ipc_connection_ex(domain, server, ip, conn_flags))) { + ntret = net_make_ipc_connection_ex(domain, server, ip, conn_flags, &cli); + if (!NT_STATUS_IS_OK(ntret)) { return -1; } @@ -180,8 +181,10 @@ int net_rpc_join_newstyle(int argc, const char **argv) /* Make authenticated connection to remote machine */ - if (!(cli = net_make_ipc_connection(NET_FLAGS_PDC))) + result = net_make_ipc_connection(NET_FLAGS_PDC, &cli); + if (!NT_STATUS_IS_OK(result)) { return 1; + } if (!(mem_ctx = talloc_init("net_rpc_join_newstyle"))) { DEBUG(0, ("Could not initialise talloc context\n")); -- cgit