From 0a6236d30db58100284843c0bcef905851a81a6f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 19 Aug 2020 12:19:25 +0200 Subject: [PATCH] 4.14-stable patches added patches: smb3-warn-on-confusing-error-scenario-with-sec-krb5.patch --- ...nfusing-error-scenario-with-sec-krb5.patch | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 queue-4.14/smb3-warn-on-confusing-error-scenario-with-sec-krb5.patch diff --git a/queue-4.14/smb3-warn-on-confusing-error-scenario-with-sec-krb5.patch b/queue-4.14/smb3-warn-on-confusing-error-scenario-with-sec-krb5.patch new file mode 100644 index 00000000000..f5b5ef4920b --- /dev/null +++ b/queue-4.14/smb3-warn-on-confusing-error-scenario-with-sec-krb5.patch @@ -0,0 +1,35 @@ +From 0a018944eee913962bce8ffebbb121960d5125d9 Mon Sep 17 00:00:00 2001 +From: Steve French +Date: Thu, 16 Jul 2020 00:34:21 -0500 +Subject: smb3: warn on confusing error scenario with sec=krb5 + +From: Steve French + +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 +Signed-off-by: Steve French +Signed-off-by: Greg Kroah-Hartman + +--- + fs/cifs/smb2pdu.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/fs/cifs/smb2pdu.c ++++ b/fs/cifs/smb2pdu.c +@@ -942,6 +942,8 @@ SMB2_auth_kerberos(struct SMB2_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; + } -- 2.47.3