RFC: lastlog access function
H. J. Lu
hjl@lucon.org
Mon Aug 4 22:44:00 GMT 2003
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 */
More information about the Libc-alpha
mailing list