COHERENT manpages

This page displays the COHERENT manpage for utmpname() [Manipulate a login logging file other than /etc/utmp].

List of available manpages
Index


utmpname() -- General Function (libc)

Manipulate a login logging file other than /etc/utmp
#include <utmp.h>
int utmpname(file)
const char *file;

The system files /etc/utmp and /usr/adm/wtmp record information about every
login event on your system --  that is, they record every time someone logs
into your system,  the line from which the user  logged in, and how long he
was  logged in.   COHERENT comes  with a set  of functions  that manipulate
these files:  they let you open  a logging file, reads  records, and update
them.

By default,  these functions manipulate  the file /etc/utmp,  which records
the login events that are active -- that is, the user has logged in but not
yet  logged  out.   Function utmpname()  lets  you  change  the file  being
manipulated.  file points  to the name of the file  you wish to manipulate.
Usually, this  is the file  /usr/adm/wtmp, which records  login events that
have concluded;  but you can name  any file in which you  or the system has
recorded login  events.  utmpname()  also closes  the logging file  that is
already open.

See Also

libc,
utmp.h