With SMB2_HDR_FLAG_SIGNED we make sure that we either use smb2 signing
or smb2 encryption for the request.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
session->smb2_channel.signing_key.length == 0) {
state->smb2.should_encrypt = false;
}
+
+ if (additional_flags & SMB2_HDR_FLAG_SIGNED) {
+ if (session->smb2_channel.signing_key.length == 0) {
+ tevent_req_nterror(req, NT_STATUS_NO_USER_SESSION_KEY);
+ return req;
+ }
+
+ additional_flags &= ~SMB2_HDR_FLAG_SIGNED;
+ state->smb2.should_sign = true;
+ }
}
if (tcon) {