summaryrefslogtreecommitdiff
path: root/source3/utils/net_rpc_join.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-09-17 15:11:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:30:50 -0500
commit1130482add933d6a3e0b7f13717e0ae72588c6a2 (patch)
treef0288bcf212a1bcbfefddee50185875b3ce7a47e /source3/utils/net_rpc_join.c
parent4f051e735b85a24f37e2b844bcbb348f36600420 (diff)
downloadsamba-1130482add933d6a3e0b7f13717e0ae72588c6a2.tar.gz
samba-1130482add933d6a3e0b7f13717e0ae72588c6a2.tar.bz2
samba-1130482add933d6a3e0b7f13717e0ae72588c6a2.zip
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)
Diffstat (limited to 'source3/utils/net_rpc_join.c')
-rw-r--r--source3/utils/net_rpc_join.c7
1 files changed, 5 insertions, 2 deletions
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"));