1) #include <unistd.h> int initgroups(const char *name, int basegid) ^^^ what about gid_t here? and in the function definition. 2) there is a typo in the man page: search for initgorups in BUGS section.
On Wed Apr 9 21:54:34 EST 1997, Philippe Charnier writes: > 1) > #include <unistd.h> > > int > initgroups(const char *name, int basegid) > > ^^^ what about gid_t here? > and in the function definition. It should be the same type that is used in pwd.h for pwd.pw_gid which, currently, is 'int'. I believe that Bruce was looking into this one, since it had to do with the self-sufficiency of headers, but I've just noticed that both files now include sys/types.h unconditionally. Of course the type of pw_uid is also part of the question. Bruce? Regards, David Nugent - Unique Computing Pty Ltd - Melbourne, Australia Voice +61-3-9791-9547 Data/BBS +61-3-9792-3507 3:632/348@fidonet davidn@freebsd.org davidn@blaze.net.au http://www.blaze.net.au/~davidn/
Should the type be changed to gid_t for the group ID? pwd.h now defines the pw_gid field as a gid_t. Guy Helmer ghelmer@freebsd.org
>Should the type be changed to gid_t for the group ID? pwd.h now defines >the pw_gid field as a gid_t. It should be changed. Just be careful not to break anything due to the type becoming unsigned. The implementation of initgroups() has some more type botches. These bugs all seem to be fixed in NetBSD. Bruce
State Changed From-To: open->closed Fixed, thanks!
Responsible Changed From-To: freebsd-bugs->markm I (markm) committed the fix.