s3-rpc_client: make sure cli_rpc_pipe_open_schannel() does not always return NT_STATU...
authorGünther Deschner <gd@samba.org>
Tue, 10 Nov 2009 12:10:12 +0000 (13:10 +0100)
committerKarolin Seeger <kseeger@samba.org>
Wed, 11 Nov 2009 13:40:37 +0000 (14:40 +0100)
Guenther

Part of a fix for bug #6697.
And hopefully a fix for bug #6889.

source3/rpc_client/cli_pipe.c

index 0d1d5e8dbda9a1a57743ba7152255bb81a52ee67..68e153038e56d061686bbeedd7ca6ad72b4ea550 100644 (file)
@@ -4034,6 +4034,8 @@ NTSTATUS cli_rpc_pipe_open_schannel(struct cli_state *cli,
        struct rpc_pipe_client *result = NULL;
        NTSTATUS status;
 
+       *presult = NULL;
+
        status = get_schannel_session_key(cli, domain, &neg_flags,
                                          &netlogon_pipe);
        if (!NT_STATUS_IS_OK(status)) {
@@ -4054,7 +4056,7 @@ NTSTATUS cli_rpc_pipe_open_schannel(struct cli_state *cli,
                *presult = result;
        }
 
-       return NT_STATUS_OK;
+       return status;
 }
 
 /****************************************************************************