summaryrefslogtreecommitdiffstats
path: root/man3/updwtmp.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/updwtmp.3')
-rw-r--r--man3/updwtmp.356
1 files changed, 56 insertions, 0 deletions
diff --git a/man3/updwtmp.3 b/man3/updwtmp.3
new file mode 100644
index 000000000..e7bb3aa3b
--- /dev/null
+++ b/man3/updwtmp.3
@@ -0,0 +1,56 @@
+.\" Copyright 1997 Nicolás Lichtmaier <nick@debian.org>
+.\" 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
+.\" Added -lutil remark, 030718
+.\"
+.TH UPDWTMP 3 2003-07-18 "GNU" "Linux Programmer's Manual"
+.SH NAME
+updwtmp, logwtmp \- append an entry to the wtmp file
+.SH SYNOPSIS
+.nf
+.B #include <utmp.h>
+.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
+used to occur in the old libbsd. These days, the
+.B logwtmp
+function is included in libutil. (Hence you'll need to add
+.B \-lutil
+to your compiler commandline to get it.)
+.SH FILES
+.TP
+.I /var/log/wtmp
+database of past user logins
+.SH "SEE ALSO"
+.BR wtmp (5)