#define smb_len_large(buf) smb_len_tcp(buf)
#define _smb_setlen_large(buf, len) _smb_setlen_tcp(buf, len)
-#define ENCRYPTION_REQUIRED(conn) ((conn) ? ((conn)->encrypt_level == Required) : false)
+#define ENCRYPTION_REQUIRED(conn) ((conn) ? ((conn)->encrypt_level == SMB_SIGNING_REQUIRED) : false)
#define IS_CONN_ENCRYPTED(conn) ((conn) ? (conn)->encrypted_tid : false)
/****************************************************************************
#else
.iDirectoryNameCacheSize = 100,
#endif
- .ismb_encrypt = Auto,
+ .ismb_encrypt = SMB_SIGNING_DEFAULT,
.param_opt = NULL,
.dummy = ""
};
if (req->encrypted) {
conn->encrypted_tid = true;
/* encrypted required from now on. */
- conn->encrypt_level = Required;
+ conn->encrypt_level = SMB_SIGNING_REQUIRED;
} else if (ENCRYPTION_REQUIRED(conn)) {
if (req->cmd != SMBtrans2 && req->cmd != SMBtranss2) {
exit_server_cleanly("encryption required "
}
switch (conn->encrypt_level) {
- case 0:
+ case SMB_SIGNING_OFF:
encrypt_caps = 0;
break;
- case 1:
- case Auto:
+ case SMB_SIGNING_IF_REQUIRED:
+ case SMB_SIGNING_DEFAULT:
encrypt_caps = CIFS_UNIX_TRANSPORT_ENCRYPTION_CAP;
break;
- case Required:
+ case SMB_SIGNING_REQUIRED:
encrypt_caps = CIFS_UNIX_TRANSPORT_ENCRYPTION_CAP|
CIFS_UNIX_TRANSPORT_ENCRYPTION_MANDATORY_CAP;
large_write = false;
return;
}
- if (lp_smb_encrypt(SNUM(conn)) == false) {
+ if (lp_smb_encrypt(SNUM(conn)) == SMB_SIGNING_OFF) {
reply_nterror(
req,
NT_STATUS_NOT_SUPPORTED);