.\" Copyright 1997 Nicolás Lichtmaier .\" Created Wed Jul 2 23:27:34 ART 1997 .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" Added info on availability, aeb, 971207 .TH UPDWTMP 3 "July 2, 1997" "GNU" "Linux Programmer's Manual" .SH NAME updwtmp, logwtmp \- append an entry to the wtmp file .SH SYNOPSIS .nf .B #include .sp .BI "void updwtmp(const char *" wtmp_file ", const struct utmp *" ut ");" .br .BI "void logwtmp(const char *" line ", const char *" name ", const char *" host ");" .fi .SH DESCRIPTION \fBupdwtmp\fR() appends the utmp structure .I ut to the wtmp file. .PP \fBlogwtmp\fR() constructs an utmp structure using .IR line ", " name ", " host "," current time and current process id. Then it calls \fBupdwtmp\fR() to append the structure to the utmp file. .SH AVAILABILITY Both functions are available under glibc2, but not under libc5. However, .B logwtmp occurs in the old libbsd. .SH FILES .TP .I /var/log/wtmp database of past user logins .SH "SEE ALSO" .BR wtmp (5)