Skip to content

Commit

Permalink
smb3: on kerberos mount if server doesn't specify auth type use krb5
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steve French committed Nov 2, 2018
1 parent f8af49d commit 926674d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fs/cifs/cifs_spnego.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,10 @@ cifs_get_spnego_key(struct cifs_ses *sesInfo)
sprintf(dp, ";sec=krb5");
else if (server->sec_mskerberos)
sprintf(dp, ";sec=mskrb5");
else
goto out;
else {
cifs_dbg(VFS, "unknown or missing server auth type, use krb5\n");
sprintf(dp, ";sec=krb5");
}

dp = description + strlen(description);
sprintf(dp, ";uid=0x%x",
Expand Down

0 comments on commit 926674d

Please sign in to comment.