aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/nfs/callback_xdr.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2019-12-23 10:28:38 -0500
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2020-01-15 10:54:31 -0500
commit2bb50aabb6f32c11dc9b542b4bb214b14e031e6c (patch)
tree6f75636b4d3ffa5be433bc269da9bfd599319fbd /fs/nfs/callback_xdr.c
parentNFS: Introduce trace events triggered by page writeback errors (diff)
downloadwireguard-linux-2bb50aabb6f32c11dc9b542b4bb214b14e031e6c.tar.xz
wireguard-linux-2bb50aabb6f32c11dc9b542b4bb214b14e031e6c.zip
NFS4: Report callback authentication errors
This seems to be a somewhat common issue with Kerberos NFSv4.0 set-ups. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/callback_xdr.c')
-rw-r--r--fs/nfs/callback_xdr.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c
index 03a20f5716c7..79ff172eb1c8 100644
--- a/fs/nfs/callback_xdr.c
+++ b/fs/nfs/callback_xdr.c
@@ -18,6 +18,7 @@
#include "callback.h"
#include "internal.h"
#include "nfs4session.h"
+#include "nfs4trace.h"
#define CB_OP_TAGLEN_MAXSZ (512)
#define CB_OP_HDR_RES_MAXSZ (2 * 4) // opcode, status
@@ -946,9 +947,13 @@ static __be32 nfs4_callback_compound(struct svc_rqst *rqstp)
if (hdr_arg.minorversion == 0) {
cps.clp = nfs4_find_client_ident(SVC_NET(rqstp), hdr_arg.cb_ident);
- if (!cps.clp || !check_gss_callback_principal(cps.clp, rqstp)) {
- if (cps.clp)
- nfs_put_client(cps.clp);
+ if (!cps.clp) {
+ trace_nfs_cb_no_clp(rqstp->rq_xid, hdr_arg.cb_ident);
+ goto out_invalidcred;
+ }
+ if (!check_gss_callback_principal(cps.clp, rqstp)) {
+ trace_nfs_cb_badprinc(rqstp->rq_xid, hdr_arg.cb_ident);
+ nfs_put_client(cps.clp);
goto out_invalidcred;
}
}