Hello, [email protected], le dim. 13 sept. 2026 11:30:33 +0200, a ecrit: > Sep 12, 2026, 10:07 by [email protected]: > > That case would have to be handled specially by the software in charge > > of the login process, indeed. But at least that's not many different > > software to fix :) > > > The attached patch fixes login(1) for me by explicitly adding the pw_gid > first and then merging the other groups (the merging makes sure that it is > not added twice) > It seems a bit weird having to add the pw_gid to the list only to special > case it anyway,
Well, getgrouplist doesn't specify where it adds the group parameter in the list, so since we want the first to be the primary id, we indeed have to ensure that. > I tried adding the egid in the setgroups copy of the egids which seems to > work but I am not sure about a few things. > Would it need to deduplicate the list again? You just need to check for the presence at the first position. Other duplications do not really matter much. > what if geteuid fails? That's really not supposed to happen (it's an EGRATUITOUS error), you can just drop the check in that case. > Does that need to be in libc or should/can auth make sure that the hurd > conventions are upheld? It's libc that provides the unix interface and manages translation with the hurd conventions. Samuel
