summaryrefslogtreecommitdiff
path: root/include/linux/sunrpc/msg_prot.h
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2025-06-20 08:16:01 -0400
committerChuck Lever <chuck.lever@oracle.com>2025-07-14 12:46:47 -0400
commitd49afc90a3ba3af4507049fb43cb128d9a9c66d5 (patch)
treee7eccc7b87dba28714d27879754f9d560c937099 /include/linux/sunrpc/msg_prot.h
parent03963793c82598ff89bcca11aba8444721f91009 (diff)
downloadlwn-d49afc90a3ba3af4507049fb43cb128d9a9c66d5.tar.gz
lwn-d49afc90a3ba3af4507049fb43cb128d9a9c66d5.zip
sunrpc: fix handling of unknown auth status codes
In the case of an unknown error code from svc_authenticate or pg_authenticate, return AUTH_ERROR with a status of AUTH_FAILED. Also add the other auth_stat value from RFC 5531, and document all the status codes. Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'include/linux/sunrpc/msg_prot.h')
-rw-r--r--include/linux/sunrpc/msg_prot.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/include/linux/sunrpc/msg_prot.h b/include/linux/sunrpc/msg_prot.h
index c4b0eb2b2f04..ada17b57ca44 100644
--- a/include/linux/sunrpc/msg_prot.h
+++ b/include/linux/sunrpc/msg_prot.h
@@ -69,15 +69,17 @@ enum rpc_reject_stat {
};
enum rpc_auth_stat {
- RPC_AUTH_OK = 0,
- RPC_AUTH_BADCRED = 1,
- RPC_AUTH_REJECTEDCRED = 2,
- RPC_AUTH_BADVERF = 3,
- RPC_AUTH_REJECTEDVERF = 4,
- RPC_AUTH_TOOWEAK = 5,
+ RPC_AUTH_OK = 0, /* success */
+ RPC_AUTH_BADCRED = 1, /* bad credential (seal broken) */
+ RPC_AUTH_REJECTEDCRED = 2, /* client must begin new session */
+ RPC_AUTH_BADVERF = 3, /* bad verifier (seal broken) */
+ RPC_AUTH_REJECTEDVERF = 4, /* verifier expired or replayed */
+ RPC_AUTH_TOOWEAK = 5, /* rejected for security reasons */
+ RPC_AUTH_INVALIDRESP = 6, /* bogus response verifier */
+ RPC_AUTH_FAILED = 7, /* reason unknown */
/* RPCSEC_GSS errors */
- RPCSEC_GSS_CREDPROBLEM = 13,
- RPCSEC_GSS_CTXPROBLEM = 14
+ RPCSEC_GSS_CREDPROBLEM = 13, /* no credentials for user */
+ RPCSEC_GSS_CTXPROBLEM = 14 /* problem with context */
};
#define RPC_MAXNETNAMELEN 256