HomeFreeBSD

nfscl: Fix handling of gssd upcalls for the NFS client

Description

nfscl: Fix handling of gssd upcalls for the NFS client

Without this patch, all upcalls to the gssd daemon are
done in vnet0 (outside of any vnet jail). This does
not work well, because a user principal's credential
cache can be within the jail (/tmp/krb5cc_NNN in the
jail's namespace).

This patch modifies the client so that RPCs done
from within vnet jails does an upcall to a gssd
daemon running within the vnet jail. It required
that the cache of uid->credential shorthands in
the rpcsec_gss be vnet'd.

The situation is still less than ideal and sec=krb5[ip]
mounts that are visible within vnet jails is still
not something I would recommend, but it can work ok
with this patch.

Vnet'ng the NFS client so that mounts can be done
within vnet jails is probably more useful, but that
will require additional work.

Discussed with: glebius
MFC after: 1 month

Details

Provenance
rmacklemAuthored on May 2 2026, 7:36 PM
Parents
rG72b1aae09bf0: stat: The devname test case requires root
Branches
Unknown
Tags
Unknown