1 #ifndef _HAVE_LOGINREC_H_
2 #define _HAVE_LOGINREC_H_
46 struct sockaddr_in sa_in;
47 struct sockaddr_storage sa_storage;
56 #define LTYPE_LOGOUT 8
59 #define LINFO_PROGSIZE 64
60 #define LINFO_LINESIZE 64
61 #define LINFO_NAMESIZE 512
62 #define LINFO_HOSTSIZE 256
65 char progname[LINFO_PROGSIZE];
70 char line[LINFO_LINESIZE];
71 char username[LINFO_NAMESIZE];
72 char hostname[LINFO_HOSTSIZE];
91 struct logininfo *login_alloc_entry(pid_t pid,
const char *username,
92 const char *hostname,
const char *line);
94 void login_free_entry(
struct logininfo *li);
96 int login_init_entry(
struct logininfo *li, pid_t pid,
const char *username,
97 const char *hostname,
const char *line);
99 void login_set_current_time(
struct logininfo *li);
102 int login_login (
struct logininfo *li);
103 int login_logout(
struct logininfo *li);
104 #ifdef LOGIN_NEEDS_UTMPX
105 int login_utmp_only(
struct logininfo *li);
111 int login_write (
struct logininfo *li);
112 int login_log_entry(
struct logininfo *li);
115 void login_set_addr(
struct logininfo *li,
const struct sockaddr *sa,
116 const unsigned int sa_size);
122 struct logininfo *login_get_lastlog(
struct logininfo *li,
const uid_t uid);
124 unsigned int login_get_lastlog_time(
const uid_t uid);
127 char *line_fullname(
char *dst,
const char *src, u_int dstsize);
128 char *line_stripname(
char *dst,
const char *src,
int dstsize);
129 char *line_abbrevname(
char *dst,
const char *src,
int dstsize);
131 void record_failed_login(
struct ssh *,
const char *,
const char *,
Definition: loginrec.h:44