Re: glibc and getgrouplist



Oswald Buddenhagen wrote:
i'd be opposed to this patch in general if it was not for the plainly
incorrect semantics of the old code.

Why this? It gives us exactly the data we want (the effective and supplementary group IDs of the current process) instead of something which is only similar to it (the group IDs of the current user ID).

Additionally, the code is much shorter and simpler.

Third, the code does not use highly dubious int->pointer and pointer->int casts.

Fourth, it is written with the current SUSv3 standard in mind and agreed upon by at least three developers. Can you say that of the old code?

Fifth it removes the need to call init_groups() and destroy_groups() from main.c, which increases modularity.

Sixth, it works even when gid_t or uid_t has a greater width than int.

Any questions left?

Roland



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]