opnsense-src/sys/rpc
Rick Macklem b9410313c6 nfscl/kgssapi: Fix Kerberized NFS mounts to pNFS servers
During recent testing related to the IETF NFSv4 Bakeathon, it was
discovered that Kerberized NFSv4.1/4.2 mounts to pNFS servers
(sec=krb5[ip],pnfs mount options) was broken.
The FreeBSD client was using the "service principal" for
the MDS to try and establish a rpcsec_gss credential for a DS,
which is incorrect. (A "service principal" looks like
"nfs@<fqdn-of-server>" and the <fqdn-of-server> for the DS is not
the same as the MDS for most pNFS servers.)

To fix this, the rpcsec_gss code needs to be able to do a
reverse DNS lookup of the DS's IP address.  A new kgssapi upcall
to the gssd(8) daemon is added by this patch to do the reverse DNS
along with a new rpcsec_gss function to generate the "service
principal".

A separate patch to the gssd(8) will be committed, so that this
patch will fix the problem.  Without the gssd(8) patch, the new
upcall fails and current/incorrect behaviour remains.

This bug only affects the rare case of a Kerberized (sec=krb5[ip],pnfs)
mount using pNFS.

This patch changes the internal KAPI between the kgssapi and
nfscl modules, but since I did a version bump a few days ago,
I will not do one this time.

(cherry picked from commit dd7d42a1fae5a4879b62689a165238082421f343)
2023-12-23 17:03:58 -08:00
..
rpcsec_gss nfscl/kgssapi: Fix Kerberized NFS mounts to pNFS servers 2023-12-23 17:03:58 -08:00
rpcsec_tls sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
auth.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
auth_none.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
auth_unix.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
authunix_prot.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
clnt.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
clnt_bck.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
clnt_dg.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
clnt_rc.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
clnt_stat.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
clnt_vc.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
getnetconfig.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
krpc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
netconfig.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
nettype.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
pmap_prot.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
replay.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
replay.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
rpc.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
rpc_callmsg.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
rpc_com.h libc/libc/rpc: refactor some global variables 2023-11-29 20:16:16 -07:00
rpc_generic.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
rpc_msg.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
rpc_prot.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
rpcb_clnt.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
rpcb_clnt.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
rpcb_prot.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
rpcb_prot.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
rpcm_subs.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
rpcsec_gss.h nfscl/kgssapi: Fix Kerberized NFS mounts to pNFS servers 2023-12-23 17:03:58 -08:00
rpcsec_tls.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
svc.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
svc.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
svc_auth.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
svc_auth.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
svc_auth_unix.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
svc_dg.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
svc_generic.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
svc_vc.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
types.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
xdr.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00