s3-smbd: Remove unused branches in negprot since security=share was removed
authorAndrew Bartlett <abartlet@samba.org>
Sun, 10 Jun 2012 06:08:12 +0000 (16:08 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 11 Jun 2012 09:44:07 +0000 (11:44 +0200)
source3/smbd/negprot.c

index 6d533334dddcc92888a7d1ac9edf6f8bfbd01f0b..93af42b5c1dee102a4df6eb0283308a7cbfbb757 100644 (file)
@@ -69,9 +69,7 @@ static void reply_lanman1(struct smb_request *req, uint16 choice)
 
        sconn->smb1.negprot.encrypted_passwords = lp_encrypted_passwords();
 
-       if (lp_security()>=SEC_USER) {
-               secword |= NEGOTIATE_SECURITY_USER_LEVEL;
-       }
+       secword |= NEGOTIATE_SECURITY_USER_LEVEL;
        if (sconn->smb1.negprot.encrypted_passwords) {
                secword |= NEGOTIATE_SECURITY_CHALLENGE_RESPONSE;
        }
@@ -116,9 +114,7 @@ static void reply_lanman2(struct smb_request *req, uint16 choice)
 
        sconn->smb1.negprot.encrypted_passwords = lp_encrypted_passwords();
 
-       if (lp_security()>=SEC_USER) {
-               secword |= NEGOTIATE_SECURITY_USER_LEVEL;
-       }
+       secword |= NEGOTIATE_SECURITY_USER_LEVEL;
        if (sconn->smb1.negprot.encrypted_passwords) {
                secword |= NEGOTIATE_SECURITY_CHALLENGE_RESPONSE;
        }
@@ -299,9 +295,7 @@ static void reply_nt1(struct smb_request *req, uint16 choice)
        if (lp_host_msdfs())
                capabilities |= CAP_DFS;
 
-       if (lp_security() >= SEC_USER) {
-               secword |= NEGOTIATE_SECURITY_USER_LEVEL;
-       }
+       secword |= NEGOTIATE_SECURITY_USER_LEVEL;
        if (sconn->smb1.negprot.encrypted_passwords) {
                secword |= NEGOTIATE_SECURITY_CHALLENGE_RESPONSE;
        }
@@ -310,18 +304,11 @@ static void reply_nt1(struct smb_request *req, uint16 choice)
        signing_required = smb_signing_is_mandatory(req->sconn->smb1.signing_state);
 
        if (signing_enabled) {
-               if (lp_security() >= SEC_USER) {
-                       secword |= NEGOTIATE_SECURITY_SIGNATURES_ENABLED;
-                       /* No raw mode with smb signing. */
-                       capabilities &= ~CAP_RAW_MODE;
-                       if (signing_required) {
-                               secword |=NEGOTIATE_SECURITY_SIGNATURES_REQUIRED;
-                       }
-               } else {
-                       DEBUG(0,("reply_nt1: smb signing is incompatible with share level security !\n"));
-                       if (signing_required) {
-                               exit_server_cleanly("reply_nt1: smb signing required and share level security selected.");
-                       }
+               secword |= NEGOTIATE_SECURITY_SIGNATURES_ENABLED;
+               /* No raw mode with smb signing. */
+               capabilities &= ~CAP_RAW_MODE;
+               if (signing_required) {
+                       secword |=NEGOTIATE_SECURITY_SIGNATURES_REQUIRED;
                }
        }