	This is a little something I put together once I began to write
password and group file editors.. If you haven't received one through the
news yet, one will be coming shortly.  This is a library package, which
I put in /usr/local/lib/libpw.a.  You use it by compiling with the
-lpw option.  I, personally, enjoy using gcc and the -ansi flag to ensure
that this program was ansi compatible, and it is.  If you don't have gcc,
you either should get it or change the Makefile.  I don't suggest touching
defs.h, it was originally there for debugging purposes.  Please change the
Makefile to suit your system before you make.

C subroutine	Input	Returns		Purpose / Usefulness
------------------------------------------------------------------------------
isuidused(x)	int	TRUE, FALSE	Checks to see if uid x is in use.
lockpwfile()	nothing	nothing		Waits for a lockfile and creates.
lockgrfile()	nothing	nothing		Same as above for group file.
unlockpwfile()	nothing	nothing		Removes the lock.
unlockgrfile()	nothing	nothing		Removes the lock for the group file.
sortgrp(grp)	char	int		Returns GID of group name 'grp'.
sortuser(unm)	char	TRUE, FALSE	Checks to see if username 'unm' in use.
sortuid(d)	int	int		Returns the next available UID after d.
putgrent(gr)	struct	nothing		A complement to getgrent().

Since nobody ever bothered to write putgrent, I did..
Sortuid(d) is a most useful tool.. You can organize the passwd file with
it, instead of tacking on new users to the end.

Replies, Flames, Comments, Bugs, Gross Errors to:

	xait.xerox.com!lsrhs!pulsar

