[PATCH/RFC] Patch to fix uid/gid lookup for NFSv4 filesystems
Lionel Cons
lionelcons1972@gmail.com
Sat Sep 19 09:54:03 GMT 2026
On Fri, 21 Aug 2026 at 17:20, Lionel Cons <lionelcons1972@gmail.com> wrote:
>
> On Sun, 16 Aug 2026 at 19:35, Lionel Cons <lionelcons1972@gmail.com> wrote:
> >
> > Repost with proper [PATCH/RFC] tag.
> >
> > I've attached a patch
> > (cygwin_dll_fix_uidgid4nfsv4_fs_20260709.diff.txt from the
> > ms-nfs41-client project) that resolves an issue with uid/gid lookups
> > on Windows NFSv4 filesystems.
> >
> > Currently, Cygwin assumes that all Windows NFS clients operate
> > similarly to the Windows NFSv3 client. It expects that account names
> > and numeric uid/gid values are identical on both the client and server
> > sides, with LDAP acting as the sole authority for these numeric
> > values.
> >
> > However, the NFSv4 protocol fundamentally changes this paradigm. As
> > defined in RFC 7530 (Section 5.9) and expanded upon in RFC 8178 (Rules
> > for NFSv4 Domain and ID Mapping), NFSv4 deprecates raw numeric uid/gid
> > protocol representation in favor of string-based identifiers (e.g.,
> > user@domain and group@domain).
> >
> > To handle this, all NFSv4 clients implement a local "idmapper"
> > component that translates these string-based identities from the
> > network side into local account data (in the case of Windows, mapping
> > user/group names and uid/gid values via nfs3attr XATTR). Because NFSv4
> > clients manage their own uid/gid translation locally, Cygwin's
> > reliance on raw LDAP data fails in these environments and results in
> > the dreaded "Unix_User+<1234>" and "Unix_Group+<5678>"-kind of
> > owner/group output in Cygwin ls -l.
> >
> > The attached patch addresses this by detecting whether the underlying
> > filesystem is NFSv4. If it is, Cygwin bypasses the LDAP assumption and
> > performs a direct pass-through of the uid/gid values supplied by the
> > NFSv4 client's idmapper.
> >
> > I have successfully tested this fix against several major clients, including:
> > - Exceed NFSv4 client
> > - OpenText NFSv4 client
> > - ms-nfs41-client
> > - ms-nfs42-client
> > - Windows NFSv3 client (no change, it continues to use LDAP raw data)
> >
> > Please let me know if you have any questions or require modifications
> > to the patch.
>
> ?
Can anyone PLEASE have a look at this patch?
Lionel
More information about the Cygwin-patches
mailing list