Skip to content

Commit 0a01894

Browse files
committed
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 <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent baf57b5 commit 0a01894

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/cifs/smb2pdu.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,6 +1387,8 @@ SMB2_auth_kerberos(struct SMB2_sess_data *sess_data)
13871387
spnego_key = cifs_get_spnego_key(ses);
13881388
if (IS_ERR(spnego_key)) {
13891389
rc = PTR_ERR(spnego_key);
1390+
if (rc == -ENOKEY)
1391+
cifs_dbg(VFS, "Verify user has a krb5 ticket and keyutils is installed\n");
13901392
spnego_key = NULL;
13911393
goto out;
13921394
}

0 commit comments

Comments
 (0)