]> Pileus Git - ~andy/linux/blobdiff - fs/cifs/transport.c
cifs: track the enablement of signing in the TCP_Server_Info
[~andy/linux] / fs / cifs / transport.c
index bfbf4700d160f8a4d54f7cc0446a35c4de8c747d..1996d6ceb8338651dd1fce8df90af787ae2ad680 100644 (file)
@@ -463,7 +463,7 @@ cifs_setup_async_request(struct TCP_Server_Info *server, struct smb_rqst *rqst)
        struct mid_q_entry *mid;
 
        /* enable signing if server requires it */
-       if (server->sec_mode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
+       if (server->sign)
                hdr->Flags2 |= SMBFLG2_SECURITY_SIGNATURE;
 
        mid = AllocMidQEntry(hdr, server);
@@ -612,7 +612,7 @@ cifs_check_receive(struct mid_q_entry *mid, struct TCP_Server_Info *server,
        dump_smb(mid->resp_buf, min_t(u32, 92, len));
 
        /* convert the length into a more usable form */
-       if (server->sec_mode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) {
+       if (server->sign) {
                struct kvec iov;
                int rc = 0;
                struct smb_rqst rqst = { .rq_iov = &iov,