On Dec 21 17:32, Mark Geisert wrote: > Hi folks, > A small spelling correction is needed; shown below... > > On 12/21/2025 2:20 AM, Takashi Yano wrote: > > On Thu, 18 Dec 2025 12:23:05 +0100 > > Corinna Vinschen wrote: > > > From: Corinna Vinschen <[email protected]> > > > > > > Commit dc7b67316d01 ("Cygwin: uinfo: prefer token primary group") > > > broke the code overriding the primary group in two different ways: > > > > > > - It changed the way myself->gid was set before checking its value. > > > > > > Prior to dc7b67316d01, myself->gid was always set to the primary group > > > from the passwd entry (pw_gid). With the patch, it was set to the > > > primary group from the Windows user token (token_gid) in the first > > > place. > > > > > > The following condition checking if pw_gid is different > > > from token_gid did so, by checking token_gid against myself->gid, > > > rather than against pw_gid. After dc7b67316d01 this was always > > > false and the code block overriding the primary group in Cygwin and > > > the Windows user token with pw_gid was never called anymore. > > > > > > The solution is obvious: Do not check token_gid against myself->gid, > > > but against the desires primary GID value in pw_gid instead. > > > > > > - The code block overriding the primary group simply assumed that > > > myself->gid was already set to pw_gid, but, as outlined above, > > > this was not true anymore after dc7b67316d01. > > > > > > This is a subtil error, because it leads to having the wrong primary > ^^^^^^ > subtle
Thanks! Fixed and following Takashi's suggestion, I'll add an Addreses: tag. Corinna
