summaryrefslogtreecommitdiff
path: root/monitor_wrap.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2005-02-03 00:20:53 +1100
committerDarren Tucker <dtucker@zip.com.au>2005-02-03 00:20:53 +1100
commit269a1ea1c80a855d1eb74fccba6dd5c75947c5d2 (patch)
tree2c3ece8547de7552c4c78337607a1a387decd797 /monitor_wrap.c
parent2fba993080eba14e339d6a6666ee79580ee20f97 (diff)
downloadopenssh-git-269a1ea1c80a855d1eb74fccba6dd5c75947c5d2.tar.gz
- (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 'monitor_wrap.c')
-rw-r--r--monitor_wrap.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/monitor_wrap.c b/monitor_wrap.c
index 23857639..983b2407 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -1103,6 +1103,36 @@ mm_auth_rsa_verify_response(Key *key, BIGNUM *p, u_char response[16])
return (success);
}
+#ifdef AUDIT_EVENTS
+void
+mm_audit_event(ssh_audit_event_t 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)