Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

smb3: warn on confusing error scenario with sec=krb5

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>

+2
+2
fs/cifs/smb2pdu.c
··· 1387 1387 spnego_key = cifs_get_spnego_key(ses); 1388 1388 if (IS_ERR(spnego_key)) { 1389 1389 rc = PTR_ERR(spnego_key); 1390 + if (rc == -ENOKEY) 1391 + cifs_dbg(VFS, "Verify user has a krb5 ticket and keyutils is installed\n"); 1390 1392 spnego_key = NULL; 1391 1393 goto out; 1392 1394 }