From e5d4e8df6b8186b71aa72dd7817f5579b44fee2f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 17 Aug 2012 09:40:52 +0200 Subject: s3:smbd: lp_smb_encrypt() returns SMB_SIGNING_* values metze --- source3/smbd/process.c | 2 +- source3/smbd/trans2.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/process.c b/source3/smbd/process.c index dd26a27ec3..f412f7b4cf 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -1492,7 +1492,7 @@ static connection_struct *switch_message(uint8 type, struct smb_request *req) 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 " diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 2de6e41d11..f09ad246b6 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -3340,14 +3340,14 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned } 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; @@ -3695,7 +3695,7 @@ static void call_trans2setfsinfo(connection_struct *conn, return; } - if (lp_smb_encrypt(SNUM(conn)) == false) { + if (lp_smb_encrypt(SNUM(conn)) == SMB_SIGNING_OFF) { reply_nterror( req, NT_STATUS_NOT_SUPPORTED); -- cgit