Deleted Added
full compact
audit.c (146998) audit.c (149749)
1/* $Id: audit.c,v 1.2 2005/02/08 10:52:48 dtucker Exp $ */
1/* $Id: audit.c,v 1.3 2005/07/17 07:26:44 djm Exp $ */
2
3/*
4 * Copyright (c) 2004, 2005 Darren Tucker. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright

--- 105 unchanged lines hidden (view full) ---

115/*
116 * Called after a connection has been accepted but before any authentication
117 * has been attempted.
118 */
119void
120audit_connection_from(const char *host, int port)
121{
122 debug("audit connection from %s port %d euid %d", host, port,
2
3/*
4 * Copyright (c) 2004, 2005 Darren Tucker. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright

--- 105 unchanged lines hidden (view full) ---

115/*
116 * Called after a connection has been accepted but before any authentication
117 * has been attempted.
118 */
119void
120audit_connection_from(const char *host, int port)
121{
122 debug("audit connection from %s port %d euid %d", host, port,
123 (int)geteuid());
123 (int)geteuid());
124}
125
126/*
127 * Called when various events occur (see audit.h for a list of possible
128 * events and what they mean).
129 */
130void
131audit_event(ssh_audit_event_t event)

--- 10 unchanged lines hidden (view full) ---

142 * within a single connection.
143 */
144void
145audit_session_open(const char *ttyn)
146{
147 const char *t = ttyn ? ttyn : "(no tty)";
148
149 debug("audit session open euid %d user %s tty name %s", geteuid(),
124}
125
126/*
127 * Called when various events occur (see audit.h for a list of possible
128 * events and what they mean).
129 */
130void
131audit_event(ssh_audit_event_t event)

--- 10 unchanged lines hidden (view full) ---

142 * within a single connection.
143 */
144void
145audit_session_open(const char *ttyn)
146{
147 const char *t = ttyn ? ttyn : "(no tty)";
148
149 debug("audit session open euid %d user %s tty name %s", geteuid(),
150 audit_username(), t);
150 audit_username(), t);
151}
152
153/*
154 * Called when a user session is closed. Argument is the tty allocated to
155 * the session, or NULL if no tty was allocated.
156 *
157 * Note that this may be called multiple times if multiple sessions are used
158 * within a single connection.
159 */
160void
161audit_session_close(const char *ttyn)
162{
163 const char *t = ttyn ? ttyn : "(no tty)";
164
165 debug("audit session close euid %d user %s tty name %s", geteuid(),
151}
152
153/*
154 * Called when a user session is closed. Argument is the tty allocated to
155 * the session, or NULL if no tty was allocated.
156 *
157 * Note that this may be called multiple times if multiple sessions are used
158 * within a single connection.
159 */
160void
161audit_session_close(const char *ttyn)
162{
163 const char *t = ttyn ? ttyn : "(no tty)";
164
165 debug("audit session close euid %d user %s tty name %s", geteuid(),
166 audit_username(), t);
166 audit_username(), t);
167}
168
169/*
170 * This will be called when a user runs a non-interactive command. Note that
171 * it may be called multiple times for a single connection since SSH2 allows
172 * multiple sessions within a single connection.
173 */
174void
175audit_run_command(const char *command)
176{
177 debug("audit run command euid %d user %s command '%.200s'", geteuid(),
178 audit_username(), command);
179}
180# endif /* !defined CUSTOM_SSH_AUDIT_EVENTS */
181#endif /* SSH_AUDIT_EVENTS */
167}
168
169/*
170 * This will be called when a user runs a non-interactive command. Note that
171 * it may be called multiple times for a single connection since SSH2 allows
172 * multiple sessions within a single connection.
173 */
174void
175audit_run_command(const char *command)
176{
177 debug("audit run command euid %d user %s command '%.200s'", geteuid(),
178 audit_username(), command);
179}
180# endif /* !defined CUSTOM_SSH_AUDIT_EVENTS */
181#endif /* SSH_AUDIT_EVENTS */