smbd:smb2: separate between encryption required and enc desired
commit6cb67e5aa66898b1d4bab189dd66d8e009d73f97
authorMichael Adam <obnox@samba.org>
Wed, 1 Jul 2015 15:42:58 +0000 (1 17:42 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 16 Jul 2015 09:48:28 +0000 (16 11:48 +0200)
tree43ae9a90329bbb1fa99869fbfa5bdfb0228a82a2
parent64297477a63cbeb7d971f0a5c0a578cc325beff6
smbd:smb2: separate between encryption required and enc desired

this means we:
- accept unencrypted requests if encryption only desired
  and not required,
- but we always send encrypted responses in the desired
  case, not only when the request was encrypted.

For this purpose, the do_encryption in the request
structure is separated into was_encrypted and do_encryption.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11372

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 3bb299944391633c45d87d5e8ad48c2c14428592)
source3/smbd/globals.h
source3/smbd/smb2_server.c