summaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2016-03-07 19:02:43 +0000
committerDamien Miller <djm@mindrot.org>2016-03-08 06:20:35 +1100
commit95767262caa6692eff1e1565be1f5cb297949a89 (patch)
tree1055360a328d0998dabb966f2e1002389f8c6c41 /monitor.c
parentaf0bb38ffd1f2c4f9f43b0029be2efe922815255 (diff)
upstream commit
refactor canohost.c: move functions that cache results closer to the places that use them (authn and session code). After this, no state is cached in canohost.c feedback and ok markus@ Upstream-ID: 5f2e4df88d4803fc8ec59ec53629105e23ce625e
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/monitor.c b/monitor.c
index ac7dd3099..6b780e480 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor.c,v 1.157 2016/02/15 23:32:37 djm Exp $ */ 1/* $OpenBSD: monitor.c,v 1.158 2016/03/07 19:02:43 djm Exp $ */
2/* 2/*
3 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
4 * Copyright 2002 Markus Friedl <markus@openbsd.org> 4 * Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -1469,6 +1469,7 @@ mm_answer_keyverify(int sock, Buffer *m)
1469static void 1469static void
1470mm_record_login(Session *s, struct passwd *pw) 1470mm_record_login(Session *s, struct passwd *pw)
1471{ 1471{
1472 struct ssh *ssh = active_state; /* XXX */
1472 socklen_t fromlen; 1473 socklen_t fromlen;
1473 struct sockaddr_storage from; 1474 struct sockaddr_storage from;
1474 1475
@@ -1490,7 +1491,7 @@ mm_record_login(Session *s, struct passwd *pw)
1490 } 1491 }
1491 /* Record that there was a login on that tty from the remote host. */ 1492 /* Record that there was a login on that tty from the remote host. */
1492 record_login(s->pid, s->tty, pw->pw_name, pw->pw_uid, 1493 record_login(s->pid, s->tty, pw->pw_name, pw->pw_uid,
1493 get_remote_name_or_ip(utmp_len, options.use_dns), 1494 session_get_remote_name_or_ip(ssh, utmp_len, options.use_dns),
1494 (struct sockaddr *)&from, fromlen); 1495 (struct sockaddr *)&from, fromlen);
1495} 1496}
1496 1497