Hello, [email protected], le mar. 29 sept. 2026 10:10:53 +0200, a ecrit: > >> and if n +1 overflows. > > > > You can return EINVAL in that case. > > Is this even something to care about in the first place ?
I was wondering indeed :) > >> Is setgroups the only libc function that has the problem? > > > > Mmmm. On GNU/Hurd only we define the equivalent seteuids for uids, I > > would say that we would want to have the same behavior, that will be > > less surprising to programmers. > > Does seteuids have the same semantic to only change "supplementary uids"? The > comment says it sets uids for the "current user" so I would assume it also > does not change the current euid. That's what I meant, yes. codesearch.debian.net doesn't show any user of seteuids, so we can fix that semantic to match setgroups' > There is also a slight inconsistency that for setgroups the amount is size_t > while for geteuids it is int. Indeed. I would say to just fix it. > I tried to use just like setgroups and it always fails with > EMIG_BAD_ARGUMENTS. Am I doing something wrong? I find it surprising that the __auth_makeauth call doesn't have MACH_MSG_TYPE_COPY_SEND like setgroups does. It was probably never actually tested. Samuel
