Path: utzoo!attcan!uunet!husc6!bbn!inmet!ishmael!cball From: cball@ishmael Newsgroups: comp.bugs.4bsd Subject: Re: getgrnam(3) bug Message-ID: <123000002@ishmael> Date: 23 May 88 14:54:00 GMT References: <762@yabbie.rmit.oz> Lines: 30 Nf-ID: #R:yabbie.rmit.oz:-76200:ishmael:123000002:000:1080 Nf-From: ishmael!cball May 23 10:54:00 1988 >/* Written 5:32 am May 11, 1988 by rcodi@yabbie.UUCP in ishmael:comp.bugs.4bsd */ >/* ---------- "getgrnam(3) bug" ---------- */ >Description: > getgrnam(3) fails to read 2nd and subsequent lines of a > multi-line group specification. This is a real headache when you have a large user community. Leaving default groups out of the group file helps. We have locally developed adduser and chdgrp(change default login group) programs that maintain this configuration. However, it is entirely possible to exceed max line lenghts with secondary group memebers. >Repeat-By: > testgroup:*:1234:somebodyelse > testgroup:*:1234:myself This proposed format significantly changes the semantics of the group file. A more natural extension would be the use of a line continuation character. I suggest the following: testgroup:*:1234:somebody,somebodyelse,\ myself,yourself This is a common mechanism that can easily be added as a patch to the existing code. Just change grskip() in getgrent.c to fgets() the next line when it matches a '/'. Charles Ball Intermetrics, Inc.