diff options
author | Ralph Boehme <slow@samba.org> | 2018-11-07 14:00:25 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2018-12-04 13:55:09 +0100 |
commit | 2332c99cba77bea1113014011d840b2005a4a75f (patch) | |
tree | 8fac5fea8a4c483f913c81db8fabf922d0494b30 /libcli | |
parent | 739ce2c733521fe53a74927f9c801ba503cc1586 (diff) | |
download | samba-2332c99cba77bea1113014011d840b2005a4a75f.tar.gz |
libcli/smb: don't overwrite status code
The original commit c5cd22b5bbce724dcd68fe94320382b3f772cabf from bug
9175 never worked, as the preceeding signing check overwrote the status
variable.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=9175
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Nov 13 17:28:45 CET 2018 on sn-devel-144
(cherry picked from commit 5a8583ed701be97c33a20b2a20f6bbb8ac2f8e99)
Diffstat (limited to 'libcli')
-rw-r--r-- | libcli/smb/smbXcli_base.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c index d0cc33b8b05..40480c83aa0 100644 --- a/libcli/smb/smbXcli_base.c +++ b/libcli/smb/smbXcli_base.c @@ -3908,15 +3908,17 @@ static NTSTATUS smb2cli_conn_dispatch_incoming(struct smbXcli_conn *conn, } if (signing_key) { - status = smb2_signing_check_pdu(*signing_key, - state->conn->protocol, - &cur[1], 3); - if (!NT_STATUS_IS_OK(status)) { + NTSTATUS signing_status; + + signing_status = smb2_signing_check_pdu(*signing_key, + state->conn->protocol, + &cur[1], 3); + if (!NT_STATUS_IS_OK(signing_status)) { /* * If the signing check fails, we disconnect * the connection. */ - return status; + return signing_status; } } |