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)
committerGünther Deschner <gd@samba.org>
Tue, 10 Nov 2009 12:10:12 +0000 (13:10 +0100)
Guenther

source3/rpc_client/cli_pipe.c

index 9ff84f8b6d1e49f5e25b3339189f3d1ed385a939..28d9d99d05376420a4433ec8403474a1002b514e 100644 (file)
@@ -4123,6 +4123,8 @@ NTSTATUS cli_rpc_pipe_open_schannel(struct cli_state *cli,
        struct rpc_pipe_client *result = NULL;
        NTSTATUS status;
 
        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)) {
        status = get_schannel_session_key(cli, domain, &neg_flags,
                                          &netlogon_pipe);
        if (!NT_STATUS_IS_OK(status)) {
@@ -4143,7 +4145,7 @@ NTSTATUS cli_rpc_pipe_open_schannel(struct cli_state *cli,
                *presult = result;
        }
 
                *presult = result;
        }
 
-       return NT_STATUS_OK;
+       return status;
 }
 
 /****************************************************************************
 }
 
 /****************************************************************************