From 9d1d2b59341f58126a69b51f9f5f8ccb9f12e54a Mon Sep 17 00:00:00 2001 From: David Howells Date: Fri, 11 Apr 2025 10:52:53 +0100 Subject: rxrpc: rxgk: Implement the yfs-rxgk security class (GSSAPI) Implement the basic parts of the yfs-rxgk security class (security index 6) to support GSSAPI-negotiated security. Signed-off-by: David Howells cc: Marc Dionne cc: Herbert Xu cc: Chuck Lever cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250411095303.2316168-9-dhowells@redhat.com Signed-off-by: Jakub Kicinski --- fs/afs/cm_security.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'fs/afs/cm_security.c') diff --git a/fs/afs/cm_security.c b/fs/afs/cm_security.c index efe6a23c8477..e8eb63e4d124 100644 --- a/fs/afs/cm_security.c +++ b/fs/afs/cm_security.c @@ -6,6 +6,7 @@ */ #include +#include #include "internal.h" #include "afs_fs.h" #include "protocol_yfs.h" @@ -17,6 +18,9 @@ */ static int afs_respond_to_challenge(struct sk_buff *challenge) { +#ifdef CONFIG_RXGK + struct krb5_buffer appdata = {}; +#endif struct rxrpc_peer *peer; unsigned long peer_data; u16 service_id; @@ -44,8 +48,16 @@ static int afs_respond_to_challenge(struct sk_buff *challenge) } switch (security_index) { +#ifdef CONFIG_RXKAD case RXRPC_SECURITY_RXKAD: return rxkad_kernel_respond_to_challenge(challenge); +#endif + +#ifdef CONFIG_RXGK + case RXRPC_SECURITY_RXGK: + case RXRPC_SECURITY_YFS_RXGK: + return rxgk_kernel_respond_to_challenge(challenge, &appdata); +#endif default: return rxrpc_kernel_reject_challenge(challenge, RX_USER_ABORT, -EPROTO, -- cgit