Re: [Ms-nfs41-client-devel] [PATCH/RFC] Patch to fix uid/gid lookup for NFSv4 filesystems

Dan Shelton <[email protected]>
Newsgroups gmane.os.cygwin.patches
Message-ID <CAAvCNcBwn0F84avS5pFS+oUoHuUAoSuKBEc2ybYScO8RDHV9NA@mail.gmail.com>
On Fri, 21 Aug 2026 at 17:21, Lionel Cons <[email protected]> wrote:
>
> On Sun, 16 Aug 2026 at 19:35, Lionel Cons <[email protected]> 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.

This is the same patch as
https://github.com/kofemann/ms-nfs41-client/blob/master/cygwin/cygwin_patches/cygwin_dll_fix_uidgid4nfsv4_fs_20260709.diff
right? Who did auhor it - Roland Mainz or someone else? Why was that
patch not submitted before?

Dan
-- 
Dan Shelton - Cluster Specialist Win/Lin/Bsd
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.