home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!paladin.american.edu!howland.reston.ans.net!usc!sol.ctr.columbia.edu!ira.uka.de!Germany.EU.net!b.marco.de!krabat!louis
- From: louis@krabat.marco.de (Ju"rgen Fluk)
- Newsgroups: comp.sys.sun.misc
- Subject: /usr/5bin/cc: initgroups() bug ?
- Message-ID: <1521@krabat.marco.de>
- Date: 8 Jan 93 12:18:58 GMT
- Organization: marco GmbH, D-8047 Karlsfeld
- Lines: 20
-
- Is there a patch for /usr/5bin/cc on SunOS 4.1.2 concerning initgroups() ?
-
- It seems like the routine is setting up an array of "int" and passing this
- down to setgroups(), which expects an array of "gid_t" (short) [see TFM].
- Result: /bin/id shows one out of two groups set to "0(wheel)".
-
- Example: my setting is
- uid=142(louis) gid=52(entw) groups=52(entw),6(mail),59(verw),99(sw)
- Running a programm with initgroups() compiled by /usr/5bin/cc gives
- uid=142(louis) gid=52(entw) groups=0(wheel),52(entw),0(wheel),6(mail)
- [groups 52 and 6 appear as 2nd and 4th entry, groups 59 and 99 discarded]
-
- My workaround re-implements initgroups() (scanning /etc/group with
- getgrent() and calling setgroups()).
-
- Any comments ?
- louis
- --
- louis@marco.de in real life: Ju"rgen Fluk
- ..!unido!marco!louis marco GmbH, 8047 Karlsfeld tel: +49 8131 90020
-