This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]