diff options
author | Darren Tucker <dtucker@zip.com.au> | 2004-07-17 17:05:14 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2004-07-17 17:05:14 +1000 |
commit | 0999174755bbc5b50d65bfa95e0b322ffd12337c (patch) | |
tree | a0153a329222f784d98f8554ecd8d1d98bce23bd /sshd.c | |
parent | 3ca45082017f0fcaf01b0bf781ae33cf1cc57e27 (diff) |
- dtucker@cvs.openbsd.org 2004/07/17 05:31:41
[monitor.c monitor_wrap.c session.c session.h sshd.c sshlogin.c]
Move "Last logged in at.." message generation to the monitor, right
before recording the new login. Fixes missing lastlog message when
/var/log/lastlog is not world-readable and incorrect datestamp when
multiple sessions are used (bz #463); much assistance & ok markus@
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -42,7 +42,7 @@ | |||
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include "includes.h" | 44 | #include "includes.h" |
45 | RCSID("$OpenBSD: sshd.c,v 1.298 2004/07/11 17:48:47 deraadt Exp $"); | 45 | RCSID("$OpenBSD: sshd.c,v 1.299 2004/07/17 05:31:41 dtucker Exp $"); |
46 | 46 | ||
47 | #include <openssl/dh.h> | 47 | #include <openssl/dh.h> |
48 | #include <openssl/bn.h> | 48 | #include <openssl/bn.h> |
@@ -216,6 +216,9 @@ Buffer loginmsg; | |||
216 | /* global authentication context */ | 216 | /* global authentication context */ |
217 | Authctxt *the_authctxt = NULL; | 217 | Authctxt *the_authctxt = NULL; |
218 | 218 | ||
219 | /* message to be displayed after login */ | ||
220 | Buffer loginmsg; | ||
221 | |||
219 | /* Prototypes for various functions defined later in this file. */ | 222 | /* Prototypes for various functions defined later in this file. */ |
220 | void destroy_sensitive_data(void); | 223 | void destroy_sensitive_data(void); |
221 | void demote_sensitive_data(void); | 224 | void demote_sensitive_data(void); |
@@ -1680,6 +1683,9 @@ main(int ac, char **av) | |||
1680 | if (privsep_preauth(authctxt) == 1) | 1683 | if (privsep_preauth(authctxt) == 1) |
1681 | goto authenticated; | 1684 | goto authenticated; |
1682 | 1685 | ||
1686 | /* prepare buffer to collect messages to display to user after login */ | ||
1687 | buffer_init(&loginmsg); | ||
1688 | |||
1683 | /* perform the key exchange */ | 1689 | /* perform the key exchange */ |
1684 | /* authenticate user and start session */ | 1690 | /* authenticate user and start session */ |
1685 | if (compat20) { | 1691 | if (compat20) { |