freebsd-src/sys/kgssapi
Rick Macklem dd7d42a1fa 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.

MFC after:	1 month
2023-10-23 13:21:14 -07:00
..
krb5 sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gss_accept_sec_context.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gss_acquire_cred.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gss_add_oid_set_member.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gss_canonicalize_name.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gss_create_empty_oid_set.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gss_delete_sec_context.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gss_display_status.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gss_export_name.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gss_get_mic.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gss_impl.c nfscl/kgssapi: Fix Kerberized NFS mounts to pNFS servers 2023-10-23 13:21:14 -07:00
gss_import_name.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gss_init_sec_context.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gss_ip_to_dns.c kgssapi: Add a new file with a function for a future commit 2023-10-23 13:17:16 -07:00
gss_names.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gss_pname_to_uid.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gss_release_buffer.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gss_release_cred.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gss_release_name.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gss_release_oid_set.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gss_set_cred_option.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gss_test_oid_set_member.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gss_unwrap.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gss_verify_mic.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gss_wrap.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gss_wrap_size_limit.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gssapi.h nfscl/kgssapi: Fix Kerberized NFS mounts to pNFS servers 2023-10-23 13:21:14 -07:00
gssapi_impl.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
gssd.x nfscl/kgssapi: Fix Kerberized NFS mounts to pNFS servers 2023-10-23 13:21:14 -07:00
gssd_prot.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gsstest.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
kgss_if.m sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00