Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Nov 1995 14:38:34 -0900 (AKST)
From:      loodvrij@gridpoint.com (Bruce J. Keeler)
To:        current@freebsd.org
Subject:   No groups?
Message-ID:  <m0tJqeY-0006edC@cyb>

next in thread | raw e-mail | index | archive | help
I've just tracked down a panic if anyone is interested.  The panic arose
while attemping to use smail with the configuration directory
/usr/local/lib/smail shared via nfs.

The problem is that smail calls setgroups() thusly:

    /* clear out all extra groups.  We don't want to have to deal with them */
    {
	gid_t dummy;
	(void) setgroups(0, &dummy);
    }

setgroups() duly sets the process's cr_ngroups to 0.  This causes a panic
later in nfs_request().

It seems unreasonable to me that setgroups() should allow this.  It checks
for the first arg being > NGROUPS, perhaps it should also check for <= 1.

-- 
Bruce J. Keeler                               Internet: bruce@gridpoint.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m0tJqeY-0006edC>