Subject: Re: bin/11047: newgrp is missing
To: NetBSD Userlevel Technical Discussion List <firstname.lastname@example.org>
From: Rick Kelly <email@example.com>
Date: 04/27/2002 14:37:44
Greg A. Woods said:
>No, not on any AT&T UNIX System V Release 4.0 or newer (or SunOS-5.x).
>Those systems all support setgroups(2) and so far as I've ever seen the
>login program on all derrivatives of those systems always calls
>setgroups() when you login making your session have the privileges of
>all the groups you are a member of at that time (up to the maximum
>number allowed by the kernel, NGROUPS_MAX, of course).
That's not what I see here on my network on Solaris 2.6 and Solaris 8.
rattler> id -a
uid=1001(rmk) gid=10(staff) groups=10(staff),777(foo)
rattler> ls -l hello
-rw-r-x--- 1 root foo 5924 Apr 26 16:53 hello
ksh: ./hello: cannot execute
rattler> /usr/bin/newgrp foo
$ id -a
uid=1001(rmk) gid=777(foo) groups=10(staff),777(foo)
Also, ksh and sh have their own wierd builtin newgrp.
Rick Kelly firstname.lastname@example.org www.rmkhome.com