summaryrefslogtreecommitdiff
path: root/loginrec.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-06-27 11:18:27 +1000
committerDamien Miller <djm@mindrot.org>2000-06-27 11:18:27 +1000
commitdd47aa21fa928354cb53a423b4f1ebcd64a83d27 (patch)
tree9c89e26ce4de7f8dd246626e9fe3d996bbd30112 /loginrec.h
parentf8af08d7cb8e4fc0c998291a76ca1f4057972565 (diff)
- (djm) Formatting
Diffstat (limited to 'loginrec.h')
-rw-r--r--loginrec.h13
1 files changed, 1 insertions, 12 deletions
diff --git a/loginrec.h b/loginrec.h
index 9d5bd6a26..b3dbb43df 100644
--- a/loginrec.h
+++ b/loginrec.h
@@ -40,7 +40,7 @@
40#include <netinet/in.h> 40#include <netinet/in.h>
41#include <sys/socket.h> 41#include <sys/socket.h>
42 42
43/* RCSID("$Id: loginrec.h,v 1.3 2000/06/19 08:20:03 andre Exp $"); */ 43/* RCSID("$Id: loginrec.h,v 1.4 2000/06/27 01:18:27 djm Exp $"); */
44 44
45/** 45/**
46 ** you should use the login_* calls to work around platform dependencies 46 ** you should use the login_* calls to work around platform dependencies
@@ -56,11 +56,9 @@ union login_netinfo {
56 struct sockaddr_storage sa_storage; 56 struct sockaddr_storage sa_storage;
57}; 57};
58 58
59
60/* 59/*
61 * * logininfo structure * 60 * * logininfo structure *
62 */ 61 */
63
64/* types - different to utmp.h 'type' macros */ 62/* types - different to utmp.h 'type' macros */
65/* (though set to the same value as linux, openbsd and others...) */ 63/* (though set to the same value as linux, openbsd and others...) */
66#define LTYPE_LOGIN 7 64#define LTYPE_LOGIN 7
@@ -73,32 +71,25 @@ union login_netinfo {
73#define LINFO_HOSTSIZE 256 71#define LINFO_HOSTSIZE 256
74 72
75struct logininfo { 73struct logininfo {
76
77 char progname[LINFO_PROGSIZE]; /* name of program (for PAM) */ 74 char progname[LINFO_PROGSIZE]; /* name of program (for PAM) */
78 int progname_null; 75 int progname_null;
79
80 short int type; /* type of login (LTYPE_*) */ 76 short int type; /* type of login (LTYPE_*) */
81
82 int pid; /* PID of login process */ 77 int pid; /* PID of login process */
83 int uid; /* UID of this user */ 78 int uid; /* UID of this user */
84 char line[LINFO_LINESIZE]; /* tty/pty name */ 79 char line[LINFO_LINESIZE]; /* tty/pty name */
85 char username[LINFO_NAMESIZE]; /* login username */ 80 char username[LINFO_NAMESIZE]; /* login username */
86 char hostname[LINFO_HOSTSIZE]; /* remote hostname */ 81 char hostname[LINFO_HOSTSIZE]; /* remote hostname */
87
88 /* 'exit_status' structure components */ 82 /* 'exit_status' structure components */
89 int exit; /* process exit status */ 83 int exit; /* process exit status */
90 int termination; /* process termination status */ 84 int termination; /* process termination status */
91
92 /* struct timeval (sys/time.h) isn't always available, if it isn't we'll 85 /* struct timeval (sys/time.h) isn't always available, if it isn't we'll
93 * use time_t's value as tv_sec and set tv_usec to 0 86 * use time_t's value as tv_sec and set tv_usec to 0
94 */ 87 */
95 unsigned int tv_sec; 88 unsigned int tv_sec;
96 unsigned int tv_usec; 89 unsigned int tv_usec;
97
98 union login_netinfo hostaddr; /* caller's host address(es) */ 90 union login_netinfo hostaddr; /* caller's host address(es) */
99}; /* struct logininfo */ 91}; /* struct logininfo */
100 92
101
102/* 93/*
103 * login recording functions 94 * login recording functions
104 */ 95 */
@@ -143,6 +134,4 @@ char *line_fullname(char *dst, const char *src, int dstsize);
143char *line_stripname(char *dst, const char *src, int dstsize); 134char *line_stripname(char *dst, const char *src, int dstsize);
144char *line_abbrevname(char *dst, const char *src, int dstsize); 135char *line_abbrevname(char *dst, const char *src, int dstsize);
145 136
146
147#endif /* _HAVE_LOGINREC_H_ */ 137#endif /* _HAVE_LOGINREC_H_ */
148