smbd:smb2: separate between encryption required and enc desired
authorMichael Adam <obnox@samba.org>
Wed, 1 Jul 2015 15:42:58 +0000 (17:42 +0200)
committerKarolin Seeger <kseeger@samba.org>
Sun, 19 Jul 2015 18:13:10 +0000 (20:13 +0200)
commit3ed2fbe74351ff13da935af355e87c28f4992415
tree65066cb326957bba9bf1df413d31291457cb7d85
parent2c19c6f4e594b1488ef38aeb84272148ef8b4b4d
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