From owner-freebsd-hackers Fri Jan 6 09:25:09 1995 Return-Path: hackers-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id JAA19153 for hackers-outgoing; Fri, 6 Jan 1995 09:25:09 -0800 Received: from iguana.reptiles.org (iguana.reptiles.org [142.57.253.130]) by freefall.cdrom.com (8.6.9/8.6.6) with SMTP id JAA19119; Fri, 6 Jan 1995 09:25:00 -0800 Received: by iguana.reptiles.org (/\==/\ Smail3.1.28.1 #28.4) id ; Fri, 6 Jan 95 12:24 EST Message-Id: From: jim@reptiles.org (Jim Mercer) Subject: 2.0-R bug in setgroups() or sys/nfs/nfs_socket.c? To: bugs@freebsd.org, hackers@freebsd.org Date: Fri, 6 Jan 1995 12:24:10 -0500 (EST) X-Mailer: ELM [version 2.4 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Length: 1828 Sender: hackers-owner@freebsd.org Precedence: bulk [ i'm re-doing this, as i think my original got lost in the majordomo failure last night ] after installing 2.0, i enabled YP and mounted /home and /var/mail via NFS (off of my SunOS 4.1.1U1 machine). the system started panic'ing with a "nfsreq nogrps" message. sys/nfs/nfs_socket.c:922 after adding a printf to the kernel, i discovered that smail3 was attempting to trundle through one of the NFS mounted directories. it was at this point that it panic'd. also, as far as the kernel was concerned, the process doing the trundling, had no gid. i looked into the smail3 source and found that it makes the following initialization: smail-3.1.29.1:src/main.c:186 #ifdef HAVE_SETGROUPS /* clear out all extra groups. We don't want to have to deal with them */ { gid_t dummy; (void) setgroups(0, &dummy); } #endif /* HAVE_SETGROUPS */ according to the smail3 conf files, HAVE_SETGROUPS is defined for these systems: aix3.1 aux3.0 bsd4.2 bsd4.3 freebsd2.0 hp-ux7.0 hp-ux8.0 linux mips-bsd4.3 next2.0 sco3.2 sys5.4 i cannot beleive that these other systems would behave the same (ie. panicing on NFS if no gid). questions: should setgroups() set at least one group (ie. from the gid field in /etc/passwd)? should NFS not be so sensitive to the lack of a gid? is the smail code "bad"? i've looked and this same code causes NFS to hang on 1.1.5.1 (but interestingly enough, it does not panic.) the panic message in nfs_socket.c was added sometime between 1.1.5.1 and 2.0-R. -- [ Jim Mercer jim@reptiles.org +1 416 506-0654 ] [ Reptilian Research -- Longer Life through Colder Blood ] [ Never, ever forget to replace the toiletseat after use!!! A wet ] [ chinchilla is a very funny and pathetic sight. -- alt.chinchilla ]