From 80838491e6ac9f4299daccfc5506b3e1e79fab38 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 3 Jul 2011 19:59:37 +0200 Subject: s3: Make cli_cm_open return NTSTATUS Autobuild-User: Volker Lendecke Autobuild-Date: Sun Jul 3 23:57:53 CEST 2011 on sn-devel-104 --- source3/lib/netapi/cm.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'source3/lib/netapi') diff --git a/source3/lib/netapi/cm.c b/source3/lib/netapi/cm.c index 47ccf8bb7a..d41a5caf5a 100644 --- a/source3/lib/netapi/cm.c +++ b/source3/lib/netapi/cm.c @@ -67,6 +67,7 @@ static WERROR libnetapi_open_ipc_connection(struct libnetapi_ctx *ctx, struct user_auth_info *auth_info = NULL; struct cli_state *cli_ipc = NULL; struct client_ipc_connection *p; + NTSTATUS status; if (!ctx || !pp || !server_name) { return WERR_INVALID_PARAM; @@ -103,16 +104,18 @@ static WERROR libnetapi_open_ipc_connection(struct libnetapi_ctx *ctx, set_cmdline_auth_info_use_ccache(auth_info, true); } - cli_ipc = cli_cm_open(ctx, NULL, - server_name, "IPC$", - auth_info, - false, false, - PROTOCOL_NT1, - 0, 0x20); - if (cli_ipc) { + status = cli_cm_open(ctx, NULL, + server_name, "IPC$", + auth_info, + false, false, + PROTOCOL_NT1, + 0, 0x20, &cli_ipc); + if (NT_STATUS_IS_OK(status)) { cli_set_username(cli_ipc, ctx->username); cli_set_password(cli_ipc, ctx->password); cli_set_domain(cli_ipc, ctx->workgroup); + } else { + cli_ipc = NULL; } TALLOC_FREE(auth_info); -- cgit