Path: utzoo!utgpu!watmath!clyde!att!rutgers!mailrus!uwmcsd1!marque!uunet!steinmetz!davidsen
From: davidsen@steinmetz.ge.com (William E. Davidsen Jr)
Newsgroups: comp.unix.questions
Subject: Re: GCOS field
Message-ID: <12717@steinmetz.ge.com>
Date: 2 Dec 88 21:18:23 GMT
References: <17641@adm.BRL.MIL> <8980@smoke.BRL.MIL> <8516@elsie.UUCP> <8990@smoke.BRL.MIL> <8517@elsie.UUCP> <9003@smoke.BRL.MIL> <1257@vsedev.VSE.COM> <7996@dasys1.UUCP> <552@auspex.UUCP>
Reply-To: davidsen@crdos1.UUCP (bill davidsen)
Organization: General Electric CRD, Schenectady, NY
Lines: 23

In article <552@auspex.UUCP> guy@auspex.UUCP (Guy Harris) writes:
| >In my flavor of unix, that's described as the "Comment" field.
| 
| Well, sort of.  Actually, in the 4.BSD "struct passwd", there are both
| "pw_comment" *and* "pw_gecos" fields; the former is set to point to a
| null string, and the latter is set to point to the GCOS/comment/full
| name/whatever field.  The S5R3.1 one also has both those fields in
| "struct passwd"; it sets them both to point to the GCOS/comment/full
| name/whatever field.

I'm not sure what you mean by "sets them both to point..." but if you
try putpwent on Ultrix, Xenix, or V/386 it seems to use the GCOS field
and ignore the comment field. That is, if you set the comment structure
member to point to "comment" and the GCOS member to point to "gcos" the
output says "gcos" and the output does not include the comment.

I assume that your posting meant the the result of getpwent has pointers
to the gcos field in both members, but they are not interchangable when
modifying an entry and writing it out.
-- 
	bill davidsen		(wedu@ge-crd.arpa)
  {uunet | philabs}!steinmetz!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me