]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Switch from a != to a ==
authorVolker Lendecke <vl@samba.org>
Tue, 12 Aug 2025 13:06:39 +0000 (15:06 +0200)
committerRalph Boehme <slow@samba.org>
Fri, 22 Aug 2025 13:55:34 +0000 (13:55 +0000)
Simpler to read for me

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/smb2_server.c

index 764da7dd7b3cb82225ae851a286a92519a35c2af..b9df0145dd2424fdf1acfbc5bb3d5b5609e780aa 100644 (file)
@@ -3106,11 +3106,13 @@ NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req)
 
        req->async_internal = false;
        req->do_signing = false;
-       if (opcode != SMB2_OP_SESSSETUP) {
-               req->do_encryption = encryption_desired;
-       } else {
+
+       if (opcode == SMB2_OP_SESSSETUP) {
                req->do_encryption = false;
+       } else {
+               req->do_encryption = encryption_desired;
        }
+
        req->was_encrypted = false;
        if (intf_v->iov_len == SMB2_TF_HDR_SIZE) {
                const uint8_t *intf = SMBD_SMB2_IN_TF_PTR(req);