Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!columbia!rutgers!im4u!oakhill!dale
From: dale@oakhill.UUCP (Dale Stevens)
Newsgroups: comp.os.minix
Subject: Re: pwd.h/getpwent.c
Message-ID: <958@oakhill.UUCP>
Date: Thu, 23-Jul-87 14:05:14 EDT
Article-I.D.: oakhill.958
Posted: Thu Jul 23 14:05:14 1987
Date-Received: Sat, 25-Jul-87 08:40:57 EDT
References: <1536@botter.cs.vu.nl>
Reply-To: dale@oakhill.UUCP (Dale Stevens)
Distribution: world
Organization: Motorola Inc. Austin, Tx
Lines: 60

In article <1536@botter.cs.vu.nl> ast@cs.vu.nl (Andy Tanenbaum) writes:
>
>I thought that getpwent.c and pwd.h were in the 1.1 distribution (in libsrc.a)
>but there have been several comments about them recently.  Here they are again.
>If login.c or uudecode really don't compile, let me know.
pwd.h and getpwent.c were included in my copy of 1.1.  Getpwent.c is in libsrc.a
but it has some bugs in it.  The following diff file shows the edits I made to
it.  After the edit it must be compiled with the -c and -LIB options and added
to libc.a with ar.

I missed the copy of login.c that was posted.  Will someone please send it to
me or maybe there are enough people that missed it that it should be reposted.

Andy, I think that minix is a great learning tool.  Best software I ever bought!

----------- getpwent.diff - cut here ---------------------------------
78c78
< 	pwd.name = _buf;
---
> 	pwd.pw_name = _buf;
80c80
< 	pwd.passwd = _buf;
---
> 	pwd.pw_passwd = _buf;
82c82
< 	pwd.uid = atoi (_buf);
---
> 	pwd.pw_uid = atoi (_buf);
84c84
< 	pwd.gid = atoi (_buf);
---
> 	pwd.pw_gid = atoi (_buf);
86c86
< 	pwd.gecos = _buf;
---
> 	pwd.pw_gecos = _buf;
88c88
< 	pwd.dir = _buf;
---
> 	pwd.pw_dir = _buf;
90c90
< 	pwd.shell = _buf;
---
> 	pwd.pw_shell = _buf;
102c102
< 		if (!strcmp (pwd -> name, name))
---
> 		if (!strcmp (pwd -> pw_name, name))
118c118
< 		if (pwd -> uid == uid)
---
> 		if (pwd -> pw_uid == uid)
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
      Dale Stevens
      Digital Signal Processors Group,
      Motorola Inc.  Austin, Texas

 {ihnp4,seismo,ctvax,gatech}!ut-sally!oakhill!dale
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=