diff options
author | Darren Tucker <dtucker@zip.com.au> | 2005-02-03 00:20:53 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2005-02-03 00:20:53 +1100 |
commit | 269a1ea1c80a855d1eb74fccba6dd5c75947c5d2 (patch) | |
tree | 2c3ece8547de7552c4c78337607a1a387decd797 /loginrec.c | |
parent | 2fba993080eba14e339d6a6666ee79580ee20f97 (diff) |
- (dtucker) [Makefile.in auth.c auth.h auth1.c auth2.c loginrec.c monitor.c
monitor.h monitor_wrap.c monitor_wrap.h session.c sshd.c] Bug #125:
(first stage) Add audit instrumentation to sshd, currently disabled by
default. with suggestions from and djm@
Diffstat (limited to 'loginrec.c')
-rw-r--r-- | loginrec.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/loginrec.c b/loginrec.c index e77318ba3..0fa9bdea7 100644 --- a/loginrec.c +++ b/loginrec.c | |||
@@ -154,6 +154,7 @@ | |||
154 | #include "atomicio.h" | 154 | #include "atomicio.h" |
155 | #include "packet.h" | 155 | #include "packet.h" |
156 | #include "canohost.h" | 156 | #include "canohost.h" |
157 | #include "auth.h" | ||
157 | 158 | ||
158 | #ifdef HAVE_UTIL_H | 159 | #ifdef HAVE_UTIL_H |
159 | # include <util.h> | 160 | # include <util.h> |
@@ -163,7 +164,7 @@ | |||
163 | # include <libutil.h> | 164 | # include <libutil.h> |
164 | #endif | 165 | #endif |
165 | 166 | ||
166 | RCSID("$Id: loginrec.c,v 1.63 2005/02/02 12:30:25 dtucker Exp $"); | 167 | RCSID("$Id: loginrec.c,v 1.64 2005/02/02 13:20:53 dtucker Exp $"); |
167 | 168 | ||
168 | /** | 169 | /** |
169 | ** prototypes for helper functions in this file | 170 | ** prototypes for helper functions in this file |
@@ -443,6 +444,12 @@ login_write(struct logininfo *li) | |||
443 | !sys_auth_record_login(li->username,li->hostname,li->line)) | 444 | !sys_auth_record_login(li->username,li->hostname,li->line)) |
444 | logit("Writing login record failed for %s", li->username); | 445 | logit("Writing login record failed for %s", li->username); |
445 | #endif | 446 | #endif |
447 | #ifdef AUDIT_EVENTS | ||
448 | if (li->type == LTYPE_LOGIN) | ||
449 | audit_session_open(li->line); | ||
450 | else if (li->type == LTYPE_LOGOUT) | ||
451 | audit_session_close(li->line); | ||
452 | #endif | ||
446 | return (0); | 453 | return (0); |
447 | } | 454 | } |
448 | 455 | ||