diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2016-03-07 19:02:44 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2016-03-07 19:02:44 +0000 |
commit | daa4435f61094021f646c9b2f59a4079546bc826 (patch) | |
tree | 62dc0c52030993ae669e55736d163f4d98c242d3 /usr.bin/ssh/monitor.c | |
parent | fa0c97b67d9de4576728f5754bee7057844bc268 (diff) |
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@
Diffstat (limited to 'usr.bin/ssh/monitor.c')
-rw-r--r-- | usr.bin/ssh/monitor.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/monitor.c b/usr.bin/ssh/monitor.c index d5b375fb03b..238ea6a4fa2 100644 --- a/usr.bin/ssh/monitor.c +++ b/usr.bin/ssh/monitor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor.c,v 1.157 2016/02/15 23:32:37 djm Exp $ */ +/* $OpenBSD: monitor.c,v 1.158 2016/03/07 19:02:43 djm Exp $ */ /* * Copyright 2002 Niels Provos <provos@citi.umich.edu> * Copyright 2002 Markus Friedl <markus@openbsd.org> @@ -1180,6 +1180,7 @@ mm_answer_keyverify(int sock, Buffer *m) static void mm_record_login(Session *s, struct passwd *pw) { + struct ssh *ssh = active_state; /* XXX */ socklen_t fromlen; struct sockaddr_storage from; @@ -1201,7 +1202,7 @@ mm_record_login(Session *s, struct passwd *pw) } /* Record that there was a login on that tty from the remote host. */ record_login(s->pid, s->tty, pw->pw_name, pw->pw_uid, - get_remote_name_or_ip(utmp_len, options.use_dns), + session_get_remote_name_or_ip(ssh, utmp_len, options.use_dns), (struct sockaddr *)&from, fromlen); } |