diff options
author | Volker Lendecke <vl@samba.org> | 2011-07-03 19:59:37 +0200 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2011-07-03 23:57:53 +0200 |
commit | 80838491e6ac9f4299daccfc5506b3e1e79fab38 (patch) | |
tree | 0a9afeda9aa2b6d6140125c546ec4abc9a538395 /source3/lib/netapi | |
parent | 714e1014c59979d9a7a7c12f21185fdf7bcab818 (diff) | |
download | samba-80838491e6ac9f4299daccfc5506b3e1e79fab38.tar.gz samba-80838491e6ac9f4299daccfc5506b3e1e79fab38.tar.bz2 samba-80838491e6ac9f4299daccfc5506b3e1e79fab38.zip |
s3: Make cli_cm_open return NTSTATUS
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Jul 3 23:57:53 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/lib/netapi')
-rw-r--r-- | source3/lib/netapi/cm.c | 17 |
1 files changed, 10 insertions, 7 deletions
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); |