cifs: reinstate sec=ntlmv2 mount option
[firefly-linux-kernel-4.4.55.git] / fs / cifs / connect.c
index 94b7788c3189281e043ecf82b9bf4fb1e9d0e0f7..a675b7f47d6347738de2d74633a7039670879d6d 100644 (file)
@@ -238,8 +238,8 @@ static const match_table_t cifs_mount_option_tokens = {
 enum {
        Opt_sec_krb5, Opt_sec_krb5i, Opt_sec_krb5p,
        Opt_sec_ntlmsspi, Opt_sec_ntlmssp,
-       Opt_ntlm, Opt_sec_ntlmi, Opt_sec_ntlmv2i,
-       Opt_sec_nontlm, Opt_sec_lanman,
+       Opt_ntlm, Opt_sec_ntlmi, Opt_sec_ntlmv2,
+       Opt_sec_ntlmv2i, Opt_sec_lanman,
        Opt_sec_none,
 
        Opt_sec_err
@@ -253,8 +253,9 @@ static const match_table_t cifs_secflavor_tokens = {
        { Opt_sec_ntlmssp, "ntlmssp" },
        { Opt_ntlm, "ntlm" },
        { Opt_sec_ntlmi, "ntlmi" },
+       { Opt_sec_ntlmv2, "nontlm" },
+       { Opt_sec_ntlmv2, "ntlmv2" },
        { Opt_sec_ntlmv2i, "ntlmv2i" },
-       { Opt_sec_nontlm, "nontlm" },
        { Opt_sec_lanman, "lanman" },
        { Opt_sec_none, "none" },
 
@@ -1167,7 +1168,7 @@ static int cifs_parse_security_flavors(char *value,
        case Opt_sec_ntlmi:
                vol->secFlg |= CIFSSEC_MAY_NTLM | CIFSSEC_MUST_SIGN;
                break;
-       case Opt_sec_nontlm:
+       case Opt_sec_ntlmv2:
                vol->secFlg |= CIFSSEC_MAY_NTLMV2;
                break;
        case Opt_sec_ntlmv2i:
@@ -2412,7 +2413,7 @@ cifs_put_smb_ses(struct cifs_ses *ses)
        int xid;
        struct TCP_Server_Info *server = ses->server;
 
-       cFYI(1, "%s: ses_count=%d\n", __func__, ses->ses_count);
+       cFYI(1, "%s: ses_count=%d", __func__, ses->ses_count);
        spin_lock(&cifs_tcp_ses_lock);
        if (--ses->ses_count > 0) {
                spin_unlock(&cifs_tcp_ses_lock);
@@ -2700,7 +2701,7 @@ cifs_put_tcon(struct cifs_tcon *tcon)
        int xid;
        struct cifs_ses *ses = tcon->ses;
 
-       cFYI(1, "%s: tc_count=%d\n", __func__, tcon->tc_count);
+       cFYI(1, "%s: tc_count=%d", __func__, tcon->tc_count);
        spin_lock(&cifs_tcp_ses_lock);
        if (--tcon->tc_count > 0) {
                spin_unlock(&cifs_tcp_ses_lock);
@@ -3009,11 +3010,11 @@ bind_socket(struct TCP_Server_Info *server)
                        saddr6 = (struct sockaddr_in6 *)&server->srcaddr;
                        if (saddr6->sin6_family == AF_INET6)
                                cERROR(1, "cifs: "
-                                      "Failed to bind to: %pI6c, error: %d\n",
+                                      "Failed to bind to: %pI6c, error: %d",
                                       &saddr6->sin6_addr, rc);
                        else
                                cERROR(1, "cifs: "
-                                      "Failed to bind to: %pI4, error: %d\n",
+                                      "Failed to bind to: %pI4, error: %d",
                                       &saddr4->sin_addr.s_addr, rc);
                }
        }
@@ -3304,9 +3305,9 @@ void reset_cifs_unix_caps(int xid, struct cifs_tcon *tcon,
                                cFYI(1, "resetting capabilities failed");
                        } else
                                cERROR(1, "Negotiating Unix capabilities "
-                                          "with the server failed.  Consider "
-                                          "mounting with the Unix Extensions\n"
-                                          "disabled, if problems are found, "
+                                          "with the server failed. Consider "
+                                          "mounting with the Unix Extensions "
+                                          "disabled if problems are found "
                                           "by specifying the nounix mount "
                                           "option.");