GCOS field

William E. Davidsen Jr davidsen at steinmetz.ge.com
Sat Dec 3 07:18:23 AEST 1988


In article <552 at auspex.UUCP> guy at 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 at ge-crd.arpa)
  {uunet | philabs}!steinmetz!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me



More information about the Comp.unix.questions mailing list