Bugzilla – Attachment 793 Details for
Bug 125
add BSM audit support
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Add audit hooks to sshd
openssh-audit-hooks2.patch (text/plain), 18.10 KB, created by
Darren Tucker
on 2005-01-30 00:46:07 AEDT
(
hide
)
Description:
Add audit hooks to sshd
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2005-01-30 00:46:07 AEDT
Size:
18.10 KB
patch
obsolete
>Index: Makefile.in >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/Makefile.in,v >retrieving revision 1.267 >diff -u -p -r1.267 Makefile.in >--- Makefile.in 18 Jan 2005 01:05:18 -0000 1.267 >+++ Makefile.in 29 Jan 2005 08:47:28 -0000 >@@ -85,7 +85,7 @@ SSHDOBJS=sshd.o auth-rhosts.o auth-passw > monitor_mm.o monitor.o monitor_wrap.o kexdhs.o kexgexs.o \ > auth-krb5.o \ > auth2-gss.o gss-serv.o gss-serv-krb5.o \ >- loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o >+ loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o audit.o > > MANPAGES = scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out ssh-rand-helper.8.out ssh-keysign.8.out sshd_config.5.out ssh_config.5.out > MANPAGES_IN = scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 ssh-rand-helper.8 ssh-keysign.8 sshd_config.5 ssh_config.5 >Index: audit.c >=================================================================== >RCS file: audit.c >diff -N audit.c >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ audit.c 29 Jan 2005 10:04:10 -0000 >@@ -0,0 +1,90 @@ >+/* $Id$ */ >+ >+/* >+ * Copyright (c) 2004, 2005 Darren Tucker. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR >+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES >+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. >+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, >+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT >+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF >+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "includes.h" >+#ifndef CUSTOM_AUDIT_EVENTS >+ >+#include "audit.h" >+#include "log.h" >+#include "auth.h" >+ >+extern Authctxt *the_authctxt; >+ >+/* >+ * Null implementations of audit functions. >+ * These get used if AUDIT_EVENTS is enabled but no audit module is defined. >+ */ >+ >+void >+audit_connection_from(const char *host, int port) >+{ >+ debug("%s: euid %d connection from %s port %d", __func__, geteuid(), >+ host, port); >+} >+ >+void >+audit_event(enum audit_event_type event) >+{ >+ /* XXX debugging only */ >+ char *eventstr[] = { >+ "AUTH_FAILED", >+ "LOGIN_SUCCESS", >+ "LOGIN_EXCEED_MAXTRIES", >+ "LOGIN_FAIL_NONE", >+ "LOGIN_FAIL_BADPW", >+ "LOGIN_FAIL_KBDINT", >+ "LOGIN_FAIL_OTHER", >+ "INVALID_USER", >+ "ROOT_NOT_CONSOLE", >+ "NOLOGIN", >+ "LOGOUT" >+ }; >+ >+ debug("%s: euid %d user %s event %d (%s)", __func__, geteuid(), >+ the_authctxt->user, event, eventstr[event]); >+} >+ >+void >+audit_save_ttyn(const char *ttyn) >+{ >+ debug("%s: euid %d user %s tty name %s", __func__, geteuid(), >+ the_authctxt->user, ttyn); >+} >+ >+void >+audit_run_command(const char *command) >+{ >+ debug("%s: euid %d user %s command '%s'", __func__, geteuid(), >+ the_authctxt->user, command); >+} >+ >+void >+record_failed_login(const char *user, const char *ttyname) >+{ >+ debug("%s: (audit) euid %d user %s ttyname %s", __func__, geteuid(), >+ user, ttyname); >+} >+#endif >Index: audit.h >=================================================================== >RCS file: audit.h >diff -N audit.h >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ audit.h 29 Jan 2005 09:57:48 -0000 >@@ -0,0 +1,52 @@ >+/* $Id$ */ >+ >+/* >+ * Copyright (c) 2004, 2005 Darren Tucker. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR >+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES >+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. >+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, >+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT >+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF >+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "auth.h" >+ >+#ifndef _SSH_AUDIT_H >+# define _SSH_AUDIT_H >+enum audit_event_type { >+ AUTH_FAILED, /* merge with LOGIN_FAIL_BADPW? */ >+ LOGIN_SUCCESS, >+ LOGIN_EXCEED_MAXTRIES, >+ LOGIN_FAIL_NONE, >+ LOGIN_FAIL_BADPW, >+ LOGIN_FAIL_KBDINT, >+ LOGIN_FAIL_OTHER, >+ INVALID_USER, >+ ROOT_NOT_CONSOLE, >+ NOLOGIN, >+ LOGOUT >+}; >+ >+void audit_init(Authctxt *ctxt); >+void audit_connection_from(const char *host, int port); >+void audit_event(enum audit_event_type event); >+void audit_save_ttyn(const char *ttyn); >+void audit_run_command(const char *command); >+void record_failed_login(const char *, const char *); >+ >+#endif /* _SSH_AUDIT_H */ >Index: auth.c >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/auth.c,v >retrieving revision 1.90 >diff -u -p -r1.90 auth.c >--- auth.c 24 Jan 2005 10:56:48 -0000 1.90 >+++ auth.c 29 Jan 2005 09:39:14 -0000 >@@ -50,6 +50,7 @@ RCSID("$OpenBSD: auth.c,v 1.57 2005/01/2 > #include "misc.h" > #include "bufaux.h" > #include "packet.h" >+#include "monitor_wrap.h" > > /* import */ > extern ServerOptions options; >@@ -246,6 +247,21 @@ auth_log(Authctxt *authctxt, int authent > if (authenticated == 0 && strcmp(method, "password") == 0) > record_failed_login(authctxt->user, "ssh"); > #endif >+#ifdef AUDIT_EVENTS >+ if (authenticated == 0) { >+ enum audit_event_type event = LOGIN_FAIL_OTHER; >+ >+ if (strcmp(method, "none") == 0) >+ event = LOGIN_FAIL_NONE; >+ else if (strcmp(method, "password") == 0) >+ event = LOGIN_FAIL_BADPW; >+ else if (strcmp(method, "keyboard-interactive") == 0) >+ event = LOGIN_FAIL_KBDINT; >+ >+ if (geteuid() == 0) >+ audit_event(event); >+ } >+#endif > } > > /* >@@ -470,6 +486,9 @@ getpwnamallow(const char *user) > #ifdef CUSTOM_FAILED_LOGIN > record_failed_login(user, "ssh"); > #endif >+#ifdef AUDIT_EVENTS >+ audit_event(INVALID_USER); >+#endif /* AUDIT_EVENTS */ > return (NULL); > } > if (!allowed_user(pw)) >Index: auth.h >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/auth.h,v >retrieving revision 1.64 >diff -u -p -r1.64 auth.h >--- auth.h 20 Jan 2005 11:20:51 -0000 1.64 >+++ auth.h 29 Jan 2005 13:09:11 -0000 >@@ -130,6 +130,7 @@ int auth_shadow_pwexpired(Authctxt *); > #endif > > #include "auth-pam.h" >+#include "audit.h" > void remove_kbdint_device(const char *); > > void disable_forwarding(void); >Index: auth1.c >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/auth1.c,v >retrieving revision 1.104 >diff -u -p -r1.104 auth1.c >--- auth1.c 3 Dec 2004 03:33:47 -0000 1.104 >+++ auth1.c 29 Jan 2005 09:11:30 -0000 >@@ -247,8 +247,12 @@ do_authloop(Authctxt *authctxt) > #else > /* Special handling for root */ > if (authenticated && authctxt->pw->pw_uid == 0 && >- !auth_root_allowed(get_authname(type))) >+ !auth_root_allowed(get_authname(type))) { > authenticated = 0; >+# ifdef AUDIT_EVENTS >+ PRIVSEP(audit_event(ROOT_NOT_CONSOLE)); >+# endif >+ } > #endif > > #ifdef USE_PAM >@@ -283,8 +287,13 @@ do_authloop(Authctxt *authctxt) > if (authenticated) > return; > >- if (authctxt->failures++ > options.max_authtries) >+ if (authctxt->failures++ > options.max_authtries) { >+#ifdef AUDIT_EVENTS >+ if (use_privsep) >+ PRIVSEP(audit_event(LOGIN_EXCEED_MAXTRIES)); >+#endif > packet_disconnect(AUTH_FAIL_MSG, authctxt->user); >+ } > > packet_start(SSH_SMSG_FAILURE); > packet_send(); >Index: auth2.c >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/auth2.c,v >retrieving revision 1.132 >diff -u -p -r1.132 auth2.c >--- auth2.c 3 Dec 2004 03:33:47 -0000 1.132 >+++ auth2.c 29 Jan 2005 13:41:22 -0000 >@@ -167,6 +167,9 @@ input_userauth_request(int type, u_int32 > if (options.use_pam) > PRIVSEP(start_pam(authctxt)); > #endif >+#ifdef AUDIT_EVENTS >+ PRIVSEP(audit_event(INVALID_USER)); >+#endif > } > setproctitle("%s%s", authctxt->valid ? user : "unknown", > use_privsep ? " [net]" : ""); >@@ -214,8 +217,12 @@ userauth_finish(Authctxt *authctxt, int > > /* Special handling for root */ > if (authenticated && authctxt->pw->pw_uid == 0 && >- !auth_root_allowed(method)) >+ !auth_root_allowed(method)) { > authenticated = 0; >+#ifdef AUDIT_EVENTS >+ PRIVSEP(audit_event(ROOT_NOT_CONSOLE)); >+#endif >+ } > > #ifdef USE_PAM > if (options.use_pam && authenticated) { >@@ -255,8 +262,13 @@ userauth_finish(Authctxt *authctxt, int > /* now we can break out */ > authctxt->success = 1; > } else { >- if (authctxt->failures++ > options.max_authtries) >+ if (authctxt->failures++ > options.max_authtries) { >+#ifdef AUDIT_EVENTS >+ if (use_privsep) >+ PRIVSEP(audit_event(LOGIN_EXCEED_MAXTRIES)); >+#endif > packet_disconnect(AUTH_FAIL_MSG, authctxt->user); >+ } > methods = authmethods_get(); > packet_start(SSH2_MSG_USERAUTH_FAILURE); > packet_put_cstring(methods); >Index: loginrec.c >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/loginrec.c,v >retrieving revision 1.62 >diff -u -p -r1.62 loginrec.c >--- loginrec.c 12 Sep 2004 05:26:01 -0000 1.62 >+++ loginrec.c 29 Jan 2005 08:56:16 -0000 >@@ -131,6 +131,7 @@ > #include "loginrec.h" > #include "log.h" > #include "atomicio.h" >+#include "auth.h" > > #ifdef HAVE_UTIL_H > # include <util.h> >@@ -205,6 +206,9 @@ login_login(struct logininfo *li) > int > login_logout(struct logininfo *li) > { >+#ifdef AUDIT_EVENTS >+ audit_event(LOGOUT); >+#endif > li->type = LTYPE_LOGOUT; > return (login_write(li)); > } >@@ -419,6 +423,10 @@ login_write(struct logininfo *li) > if (li->type == LTYPE_LOGIN && > !sys_auth_record_login(li->username,li->hostname,li->line)) > logit("Writing login record failed for %s", li->username); >+#endif >+#ifdef AUDIT_EVENTS >+ if (li->type == LTYPE_LOGIN) >+ audit_save_ttyn(li->line); > #endif > return (0); > } >Index: monitor.c >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/monitor.c,v >retrieving revision 1.77 >diff -u -p -r1.77 monitor.c >--- monitor.c 11 Sep 2004 13:07:03 -0000 1.77 >+++ monitor.c 29 Jan 2005 13:40:41 -0000 >@@ -143,6 +143,11 @@ int mm_answer_gss_userok(int, Buffer *); > int mm_answer_gss_checkmic(int, Buffer *); > #endif > >+#ifdef AUDIT_EVENTS >+int mm_answer_audit_event(int, Buffer *); >+int mm_answer_audit_command(int, Buffer *); >+#endif >+ > static Authctxt *authctxt; > static BIGNUM *ssh1_challenge = NULL; /* used for ssh1 rsa auth */ > >@@ -186,6 +191,9 @@ struct mon_table mon_dispatch_proto20[] > {MONITOR_REQ_PAM_RESPOND, MON_ISAUTH, mm_answer_pam_respond}, > {MONITOR_REQ_PAM_FREE_CTX, MON_ONCE|MON_AUTHDECIDE, mm_answer_pam_free_ctx}, > #endif >+#ifdef AUDIT_EVENTS >+ {MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event}, >+#endif > #ifdef BSD_AUTH > {MONITOR_REQ_BSDAUTHQUERY, MON_ISAUTH, mm_answer_bsdauthquery}, > {MONITOR_REQ_BSDAUTHRESPOND, MON_AUTH,mm_answer_bsdauthrespond}, >@@ -211,6 +219,10 @@ struct mon_table mon_dispatch_postauth20 > {MONITOR_REQ_PTY, 0, mm_answer_pty}, > {MONITOR_REQ_PTYCLEANUP, 0, mm_answer_pty_cleanup}, > {MONITOR_REQ_TERM, 0, mm_answer_term}, >+#ifdef AUDIT_EVENTS >+ {MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event}, >+ {MONITOR_REQ_AUDIT_COMMAND, MON_PERMIT|MON_ONCE, mm_answer_audit_command}, >+#endif > {0, 0, NULL} > }; > >@@ -1490,6 +1502,46 @@ mm_answer_term(int sock, Buffer *req) > /* Terminate process */ > exit(res); > } >+ >+#ifdef AUDIT_EVENTS >+/* Report that an audit event occurred */ >+int >+mm_answer_audit_event(int socket, Buffer *m) >+{ >+ enum audit_event_type event; >+ >+ debug3("%s entering", __func__); >+ >+ event = buffer_get_int(m); >+ buffer_free(m); >+ switch(event) { >+ case NOLOGIN: >+ case AUTH_FAILED: >+ case LOGIN_EXCEED_MAXTRIES: >+ audit_event(event); >+ break; >+ default: >+ fatal("Audit event type %d not permitted", event); >+ } >+ >+ return (0); >+} >+ >+int >+mm_answer_audit_command(int socket, Buffer *m) >+{ >+ u_int len; >+ char *cmd; >+ >+ debug3("%s entering", __func__); >+ cmd = buffer_get_string(m, &len); >+ /* sanity check command, if so how? */ >+ buffer_free(m); >+ audit_run_command(cmd); >+ xfree(cmd); >+ return (0); >+} >+#endif /* AUDIT_EVENTS */ > > void > monitor_apply_keystate(struct monitor *pmonitor) >Index: monitor.h >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/monitor.h,v >retrieving revision 1.19 >diff -u -p -r1.19 monitor.h >--- monitor.h 17 Nov 2003 11:18:22 -0000 1.19 >+++ monitor.h 29 Jan 2005 10:08:13 -0000 >@@ -59,6 +59,7 @@ enum monitor_reqtype { > MONITOR_REQ_PAM_QUERY, MONITOR_ANS_PAM_QUERY, > MONITOR_REQ_PAM_RESPOND, MONITOR_ANS_PAM_RESPOND, > MONITOR_REQ_PAM_FREE_CTX, MONITOR_ANS_PAM_FREE_CTX, >+ MONITOR_REQ_AUDIT_EVENT, MONITOR_REQ_AUDIT_COMMAND, > MONITOR_REQ_TERM > }; > >Index: monitor_wrap.c >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/monitor_wrap.c,v >retrieving revision 1.49 >diff -u -p -r1.49 monitor_wrap.c >--- monitor_wrap.c 11 Sep 2004 13:07:03 -0000 1.49 >+++ monitor_wrap.c 29 Jan 2005 10:31:04 -0000 >@@ -1103,6 +1103,36 @@ mm_auth_rsa_verify_response(Key *key, BI > return (success); > } > >+#ifdef AUDIT_EVENTS >+void >+mm_audit_event(enum audit_event_type event) >+{ >+ Buffer m; >+ >+ debug3("%s entering", __func__); >+ >+ buffer_init(&m); >+ buffer_put_int(&m, event); >+ >+ mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUDIT_EVENT, &m); >+ buffer_free(&m); >+} >+ >+void >+mm_audit_run_command(const char *command) >+{ >+ Buffer m; >+ >+ debug3("%s entering command %s", __func__, command); >+ >+ buffer_init(&m); >+ buffer_put_cstring(&m, command); >+ >+ mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUDIT_COMMAND, &m); >+ buffer_free(&m); >+} >+#endif /* AUDIT_EVENTS */ >+ > #ifdef GSSAPI > OM_uint32 > mm_ssh_gssapi_server_ctx(Gssctxt **ctx, gss_OID goid) >Index: monitor_wrap.h >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/monitor_wrap.h,v >retrieving revision 1.19 >diff -u -p -r1.19 monitor_wrap.h >--- monitor_wrap.h 22 Jun 2004 02:56:02 -0000 1.19 >+++ monitor_wrap.h 29 Jan 2005 13:22:25 -0000 >@@ -74,6 +74,12 @@ int mm_sshpam_respond(void *, u_int, cha > void mm_sshpam_free_ctx(void *); > #endif > >+#ifdef AUDIT_EVENTS >+#include "audit.h" >+void mm_audit_event(enum audit_event_type); >+void mm_audit_run_command(const char *); >+#endif >+ > struct Session; > void mm_terminate(void); > int mm_pty_allocate(int *, int *, char *, int); >Index: session.c >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/session.c,v >retrieving revision 1.291 >diff -u -p -r1.291 session.c >--- session.c 19 Jan 2005 23:55:46 -0000 1.291 >+++ session.c 29 Jan 2005 13:28:19 -0000 >@@ -111,6 +111,7 @@ login_cap_t *lc; > #endif > > static int is_child = 0; >+static int nologin = 0; > > /* Name and directory of socket for authentication agent forwarding. */ > static char *auth_sock_name = NULL; >@@ -665,6 +666,24 @@ do_exec(Session *s, const char *command) > debug("Forced command '%.900s'", command); > } > >+#ifdef AUDIT_EVENTS >+ if (command != NULL) >+ PRIVSEP(audit_run_command(command)); >+ /* >+ * this is incompatible with the HAVE_LOGIN_CAP bits in do_nologin. >+ * To fix it would require changing do_nologin to return a value. >+ */ >+ if (s->pw->pw_uid != 0) { >+ FILE *f; >+ >+ if ((f = fopen(_PATH_NOLOGIN, "r")) != NULL) { >+ fclose(f); >+ nologin = 1; >+ PRIVSEP(audit_event(NOLOGIN)); >+ } >+ } >+#endif >+ > #ifdef GSSAPI > if (options.gss_authentication) { > temporarily_use_uid(s->pw); >@@ -1228,6 +1247,16 @@ do_nologin(struct passwd *pw) > if (pw->pw_uid) > f = fopen(_PATH_NOLOGIN, "r"); > #endif >+ >+#ifdef AUDIT_EVENTS >+ if (nologin && f == NULL) { >+ /* we recorded a nologin earlier but the file has disappeared */ >+ printf("Can't open %s: %s", _PATH_NOLOGIN, strerror(errno)); >+ fflush(NULL); >+ exit(254); >+ } >+#endif >+ > if (f) { > /* /etc/nologin exists. Print its contents and exit. */ > logit("User %.100s not allowed because %s exists", >Index: sshd.c >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/sshd.c,v >retrieving revision 1.302 >diff -u -p -r1.302 sshd.c >--- sshd.c 24 Jan 2005 10:55:49 -0000 1.302 >+++ sshd.c 29 Jan 2005 09:01:11 -0000 >@@ -1628,6 +1628,9 @@ main(int ac, char **av) > remote_port = get_remote_port(); > remote_ip = get_remote_ipaddr(); > >+#ifdef AUDIT_EVENTS >+ audit_connection_from(remote_ip, remote_port); >+#endif > #ifdef LIBWRAP > /* Check whether logins are denied from this host. */ > if (packet_connection_is_on_socket()) { >@@ -1697,6 +1700,10 @@ main(int ac, char **av) > } > > authenticated: >+#ifdef AUDIT_EVENTS >+ audit_event(LOGIN_SUCCESS); >+#endif >+ > /* > * In privilege separation, we fork another child and prepare > * file descriptor passing.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 125
:
131
|
192
|
355
|
438
|
500
|
560
|
618
|
619
|
647
|
753
|
754
|
755
|
756
|
793
|
794
|
795
|
796
|
800
|
804
|
820
|
826
|
845
|
846