nfscl: Improve NFSv4 error message for NFSERR_WRONGSEC

The usual reason for an NFSv4 server replying NFSERR_WRONGSEC
to an operation is that a Kerberos credential is required.
This patch replaces a cryptic "err=10016" with a message
suggesting that a Kerberos TGT is probably needed.

MFC after:	2 weeks
This commit is contained in:
Rick Macklem 2023-01-11 13:28:44 -08:00
parent e3c26ce5cb
commit 39633fc173

View File

@ -1194,6 +1194,10 @@ nfscl_maperr(struct thread *td, int error, uid_t uid, gid_t gid)
printf("nfsv4 no file handle: usually means the file "
"system is not exported on the NFSv4 server\n");
return (EIO);
case NFSERR_WRONGSEC:
tprintf(p, LOG_INFO, "NFSv4 error WrongSec: You probably need a"
" Kerberos TGT\n");
return (EIO);
default:
tprintf(p, LOG_INFO, "nfsv4 err=%d\n", error);
return (EIO);