Skip to content

Commit f4d8494

Browse files
smfrenchgregkh
authored andcommitted
smb3: warn on confusing error scenario with sec=krb5
commit 0a01894 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>
1 parent a834132 commit f4d8494

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

fs/cifs/smb2pdu.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,6 +1132,8 @@ SMB2_auth_kerberos(struct SMB2_sess_data *sess_data)
11321132
spnego_key = cifs_get_spnego_key(ses);
11331133
if (IS_ERR(spnego_key)) {
11341134
rc = PTR_ERR(spnego_key);
1135+
if (rc == -ENOKEY)
1136+
cifs_dbg(VFS, "Verify user has a krb5 ticket and keyutils is installed\n");
11351137
spnego_key = NULL;
11361138
goto out;
11371139
}

0 commit comments

Comments
 (0)