1 #ifndef _HAVE_LOGINREC_H_ 2 #define _HAVE_LOGINREC_H_ 44 struct sockaddr_in sa_in;
45 struct sockaddr_storage sa_storage;
54 #define LTYPE_LOGOUT 8 57 #define LINFO_PROGSIZE 64 58 #define LINFO_LINESIZE 64 59 #define LINFO_NAMESIZE 512 60 #define LINFO_HOSTSIZE 256 63 char progname[LINFO_PROGSIZE];
68 char line[LINFO_LINESIZE];
69 char username[LINFO_NAMESIZE];
70 char hostname[LINFO_HOSTSIZE];
89 struct logininfo *login_alloc_entry(pid_t pid,
const char *username,
90 const char *hostname,
const char *line);
92 void login_free_entry(
struct logininfo *li);
94 int login_init_entry(
struct logininfo *li, pid_t pid,
const char *username,
95 const char *hostname,
const char *line);
97 void login_set_current_time(
struct logininfo *li);
100 int login_login (
struct logininfo *li);
101 int login_logout(
struct logininfo *li);
102 #ifdef LOGIN_NEEDS_UTMPX 103 int login_utmp_only(
struct logininfo *li);
109 int login_write (
struct logininfo *li);
110 int login_log_entry(
struct logininfo *li);
113 void login_set_addr(
struct logininfo *li,
const struct sockaddr *sa,
114 const unsigned int sa_size);
120 struct logininfo *login_get_lastlog(
struct logininfo *li,
const uid_t uid);
122 unsigned int login_get_lastlog_time(
const uid_t uid);
125 char *line_fullname(
char *dst,
const char *src, u_int dstsize);
126 char *line_stripname(
char *dst,
const char *src,
int dstsize);
127 char *line_abbrevname(
char *dst,
const char *src,
int dstsize);
129 void record_failed_login(
const char *,
const char *,
const char *);
Definition: loginrec.h:42