aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2018-10-28 14:13:23 -0400
committerSteve French <stfrench@microsoft.com>2018-11-02 15:09:41 -0400
commit926674de6705f0f1dbf29a62fd758d0977f535d6 (patch)
treef80bae5b8da57a19ad3d79911116cf4899344a30
parentf8af49dd1702118e9520f946ce1cf591d553608f (diff)
smb3: on kerberos mount if server doesn't specify auth type use krb5
Some servers (e.g. Azure) do not include a spnego blob in the SMB3 negotiate protocol response, so on kerberos mounts ("sec=krb5") we can fail, as we expected the server to list its supported auth types (OIDs in the spnego blob in the negprot response). Change this so that on krb5 mounts we default to trying krb5 if the server doesn't list its supported protocol mechanisms. Signed-off-by: Steve French <stfrench@microsoft.com> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com> CC: Stable <stable@vger.kernel.org>
-rw-r--r--fs/cifs/cifs_spnego.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c
index b611fc2e8984..7f01c6e60791 100644
--- a/fs/cifs/cifs_spnego.c
+++ b/fs/cifs/cifs_spnego.c
@@ -147,8 +147,10 @@ cifs_get_spnego_key(struct cifs_ses *sesInfo)
147 sprintf(dp, ";sec=krb5"); 147 sprintf(dp, ";sec=krb5");
148 else if (server->sec_mskerberos) 148 else if (server->sec_mskerberos)
149 sprintf(dp, ";sec=mskrb5"); 149 sprintf(dp, ";sec=mskrb5");
150 else 150 else {
151 goto out; 151 cifs_dbg(VFS, "unknown or missing server auth type, use krb5\n");
152 sprintf(dp, ";sec=krb5");
153 }
152 154
153 dp = description + strlen(description); 155 dp = description + strlen(description);
154 sprintf(dp, ";uid=0x%x", 156 sprintf(dp, ";uid=0x%x",