diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-10-06 14:19:39 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-10-07 22:47:04 +0200 |
commit | 3eef853f741d9349e45a1a87e453c52bf56c4774 (patch) | |
tree | ea5a5b8601cea18e3d6adc667f67ac0b8ea63e51 | |
parent | b376a822259aac3904d8bb47da77173d21e8a716 (diff) | |
download | samba-3eef853f741d9349e45a1a87e453c52bf56c4774.tar.gz |
libcli/smb: fix smb2cli_validate_negotiate_info with min=PROTOCOL_NT1 max=PROTOCOL_SMB2_02
If the connection starts with a SMB Negprot, the server only implies the
selected dialect, but not the clients security mode.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r-- | libcli/smb/smbXcli_base.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c index ac81f7a9320..8a8bbd063a8 100644 --- a/libcli/smb/smbXcli_base.c +++ b/libcli/smb/smbXcli_base.c @@ -4649,7 +4649,11 @@ struct tevent_req *smb2cli_validate_negotiate_info_send(TALLOC_CTX *mem_ctx, } else { memset(buf+4, 0, 16); /* ClientGuid */ } - SCVAL(buf, 20, conn->smb2.client.security_mode); + if (state->conn->min_protocol >= PROTOCOL_SMB2_02) { + SCVAL(buf, 20, conn->smb2.client.security_mode); + } else { + SCVAL(buf, 20, 0); + } SCVAL(buf, 21, 0); /* reserved */ for (i=0; i < ARRAY_SIZE(smb2cli_prots); i++) { |