This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
RFC: lastlog access function
- From: "H. J. Lu" <hjl at lucon dot org>
- To: GNU C Library <libc-alpha at sources dot redhat dot com>
- Date: Mon, 4 Aug 2003 15:44:39 -0700
- Subject: RFC: lastlog access function
login from util-linux accesses lastlog directly. I am proposing this
lastlog access interface. Any comments?
H.J.
---<lastlog.h>---
/* This header file is used in 4.3BSD to define `struct lastlog',
which we define in <bits/utmp.h>. */
#ifndef _LASTLOG_H
#define _LASTLOG_H 1
#include <utmp.h>
#include <pwd.h>
__BEGIN_DECLS
#ifdef __USE_MISC
/* Open the lastlog-file stream for read and write. */
extern void setllent (void) __THROW;
/* Close the current open lastlog-file stream. */
extern void endllent (void) __THROW;
/* Read the entry from the lastlog-file stream for the given
passwd. */
extern int getllent (__const struct passwd *__p,
struct lastlog *__buffer,
struct lastlog **__result) __THROW;
/* Write the lastlog entry for the given passwd to the lastlog-file
stream. */
extern int putllent (__const struct passwd *__p,
struct lastlog *__l); __THROW;
__END_DECLS
#endif /* Use misc. */
#endif /* lastlog.h */