#include <util.h> intpw_lock(int retries);
intpw_mkdb(char *username, int pwflags);
functions allow a program to update the system passwd database.
function attempts to lock the passwd database by creating the file
and returns the file descriptor of that file.
is greater than zero,
will try multiple times to open
waiting one second between tries.
In addition to being a lock file,
will also hold the contents of the new passwd file.
A different lock file can be specified with
must be called before
function updates the passwd file from the contents of
is specified, only the record for the specified user will be updated.
are specified by
the following values:
only update the secure database file
do not update the Version 7 format password file
By default the secure, insecure and Version 7 format password databases
You should finish writing to and close the file descriptor returned by
fails and you do not wish to retry, you should make sure to call
to clean up the lock file.
function aborts a passwd file update by deleting
The passwd database remains unchanged.
function returns \-1 on error and sets
function returns \-1 if it is unable to complete properly.