#include <linux/uaccess.h>
#include "cifspdu.h"
#include "cifsglob.h"
-#include "smb2glob.h"
#include "cifsproto.h"
#include "cifs_debug.h"
#include "cifsfs.h"
else if (server->compress_algorithm == SMB3_COMPRESS_LZ77_HUFF)
seq_printf(m, " COMPRESS_LZ77_HUFF");
if (server->sign)
- seq_printf(m, " signed (%s)",
- smb2_signing_algo_str(server->signing_algorithm));
+ seq_printf(m, " signed");
if (server->posix_ext_supported)
seq_printf(m, " posix");
if (server->nosharesock)
if (ses->session_flags & SMB2_SESSION_FLAG_ENCRYPT_DATA)
seq_puts(m, " encrypted");
if (ses->sign)
- seq_printf(m, " signed (%s)",
- smb2_signing_algo_str(server->signing_algorithm));
+ seq_puts(m, " signed");
seq_printf(m, "\n\tUser: %d Cred User: %d",
from_kuid(&init_user_ns, ses->linux_uid),
#define END_OF_CHAIN 4
#define RELATED_REQUEST 8
-static inline const char *smb2_signing_algo_str(u16 algo)
-{
- switch (algo) {
- case SIGNING_ALG_HMAC_SHA256: return "HMAC-SHA256";
- case SIGNING_ALG_AES_CMAC: return "AES-CMAC";
- case SIGNING_ALG_AES_GMAC: return "AES-GMAC";
- default: return "unknown algorithm";
- }
-}
-
#endif /* _SMB2_GLOB_H */
/* request is coming from the server, set LSB */
if (is_server)
- nonce.role |= cpu_to_le32(1);
+ nonce.role |= 1UL << 0;
/* set penultimate LSB if SMB2_CANCEL command */
if (shdr->Command == SMB2_CANCEL)
- nonce.role |= cpu_to_le32(1UL << 1);
+ nonce.role |= 1UL << 1;
memcpy(*out_nonce, (u8 *)&nonce, SMB3_AES_GCM_NONCE);
if ((shdr->Command == SMB2_NEGOTIATE) ||
(shdr->Command == SMB2_SESSION_SETUP) ||
(shdr->Command == SMB2_OPLOCK_BREAK) ||
- (shdr->MessageId == U64_MAX) || /* MS-SMB2 3.2.5.1.3 */
+ (shdr->MessageId == 0xFFFFFFFFFFFFFFFF) || /* MS-SMB2 3.2.5.1.3 */
(shdr->Status == STATUS_PENDING) || /* MS-SMB2 3.2.5.1.3 */
server->ignore_signature ||
(!server->session_estab))