Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug in setgroups() (FreeBSD, maybe NET/BSDI/4.4)

2 views
Skip to first unread message

Jim Mercer

unread,
Aug 9, 1995, 3:00:00 AM8/9/95
to
i found this bug in FreeBSD 2.0, and reported it, and see that it is still
in 2.0.5.

this bug could possibly be in all 4.3/4.4 based BSD's depending on how
the setgroups() and/or nfs drivers were hacked.

basically, the setgroups() call takes 2 args, numgrps, and array_of_groups.

if setgroups() is called with numgrps = 0, FreeBSD (at least) will delete
the current processes group associations, all of them including the
default login group.

when playing with smail3, with the users $HOMES, and /var/spool/mail mounted
via NFS, this caused core dumps in FreeBSD-1.1.5.1, kernel panics in 2.0+.

the cause is that the nfs drivers in the kernel do not know how to react
when there are no groups.

should the NFS code be modified, or should setgroups() at least set
the default login group, if numgrps == 0?

--
[ Jim Mercer j...@reptiles.org +1 416 506-0654 ]
[ "Never pet your dog when it is on fire." ]
[ -- http://pharmdec.wustl.edu/cgi-bin/jardin_scripts/SCG ]
[ Reptilian Research Longer Life through Colder Blood ]

0 new messages