Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!brl-adm!adm!aglew%mycroft@gswd-vms.arpa From: aglew%mycroft@gswd-vms.arpa (Andy Glew) Newsgroups: comp.unix.wizards Subject: Groups in 4BSD Message-ID: <5035@brl-adm.ARPA> Date: Thu, 19-Mar-87 11:35:04 EST Article-I.D.: brl-adm.5035 Posted: Thu Mar 19 11:35:04 1987 Date-Received: Sat, 21-Mar-87 04:36:15 EST Sender: news@brl-adm.ARPA Lines: 34 ...> Groups in 4BSD In a previous post someone said <<4.2 BSD's group system makes System V style chown'ing by non-root unnecessary - newgrp isn't necessary in BSD>>. To which I made the rather cryptic comment <> I apologize for being cryptic. What I meant to say was that BSD does have the equivalent of newgrp - it's just not accessible to the user. As is obviously necessary when you could possibly be a member of an >NGROUPS groups. So I reject "newgrp isn't necessary". Newgrp isn't AS necessary, but it's still occasionally necessary. 16 is too small a number. There should be a way to dynamically add groups to your group set, with some sort of replacement algorithm. I don't accept "static during your terminal session"; effectively, it's globally static, unless you allow people to do their own editing of /etc/groups, if only to reorder the list of groups and determine which subset of the greater than 16 groups they belong to are installed as their groupset. Of course, there is a way - setgroups(2), with setgid(2) for the first function, changing the default gid for file creation. Unfortunately, setgroups is a super-user call. So there is a need for newgrp - although it's provided as a system call, not a "standard" command. This breaks the rule "anything you can do in C should have a command level interface". Obviously, the command level interface for setgroups would be a setuid program that checked whether the groups that the user is requesting be added (set) into his active groupset are permitted to him. Andy "Krazy" Glew. Gould CSD-Urbana. USEnet: ihnp4!uiucdcs!ccvaxa!aglew 1101 E. University, Urbana, IL 61801 ARPAnet: aglew@gswd-vms.arpa