Subject: bin/14172
To: None <tech-userlevel@netbsd.org>
From: Jason R. Fink <jrf@adresearch.com>
List: tech-userlevel
Date: 11/14/2002 09:03:38
Hello all,

This is a detailed follow up to my previous email on the same subject.
The basic issue is really a change request, when an account is in more than
NGROUPS (default of 16) the error message is not very informative. At first
this sounds simple enough, however, I ran into some interesting issues.

The error is generated from a -1 return in following is where the initial
-1 is sent up all the way to login:

src/lib/libc/gen/getgrouplist.c:getgrouplist()
src/lib/libc/gen/initgroups.c:initgroups()
src/lib/libutil/login_cap.c:setusercontext()
src/usr.bin/login/login.c:main()

Initially I thought that simply sending E2BIG backup would suffice, if the
default error message was not enough, I could just amplify it a little. When
I looked in login_cap.c, however, I realized that may not be the best approach.
Within login_cap.c in setusercontext, initgroups is in a long series of
if tests that, if they fail, return -1.

Basically, my questions are:

	- should I even bother? just close the pr with some explanation since
	  this is how it is *supposed* to work?
	- for now, just change this one and see what everyone thinks
	- investigate changing how the error reporting in the login shell is
	  handled across the board?

Thanks for your time,

	j

-- 
Jay Fink http://pyxis.homeunix.net/
NetBSD Developer http://www.netbsd.org/
Senior SysAdmin/Programmer, Ipsos http://www.ipsos.com/