summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2020-07-16 08:34:21 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-21 12:05:28 +0300
commitf4d84941832fca4b1939b1683dd1e40fdc59a32d (patch)
tree0296891101d2fde7790cb5a0cc69863ddfc40bba /fs
parenta834132bd465f9d7f4049be65648e01cf2533cb8 (diff)
downloadlinux-f4d84941832fca4b1939b1683dd1e40fdc59a32d.tar.xz
smb3: warn on confusing error scenario with sec=krb5
commit 0a018944eee913962bce8ffebbb121960d5125d9 upstream. When mounting with Kerberos, users have been confused about the default error returned in scenarios in which either keyutils is not installed or the user did not properly acquire a krb5 ticket. Log a warning message in the case that "ENOKEY" is returned from the get_spnego_key upcall so that users can better understand why mount failed in those two cases. CC: Stable <stable@vger.kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/smb2pdu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index e2d2b749c8f3..379ac8caa29a 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -1132,6 +1132,8 @@ SMB2_auth_kerberos(struct SMB2_sess_data *sess_data)
spnego_key = cifs_get_spnego_key(ses);
if (IS_ERR(spnego_key)) {
rc = PTR_ERR(spnego_key);
+ if (rc == -ENOKEY)
+ cifs_dbg(VFS, "Verify user has a krb5 ticket and keyutils is installed\n");
spnego_key = NULL;
goto out;
}