summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2004-07-17 17:05:14 +1000
committerDarren Tucker <dtucker@zip.com.au>2004-07-17 17:05:14 +1000
commit0999174755bbc5b50d65bfa95e0b322ffd12337c (patch)
treea0153a329222f784d98f8554ecd8d1d98bce23bd /sshd.c
parent3ca45082017f0fcaf01b0bf781ae33cf1cc57e27 (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.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sshd.c b/sshd.c
index ac62cb506..a9e7ccb31 100644
--- a/sshd.c
+++ b/sshd.c
@@ -42,7 +42,7 @@
42 */ 42 */
43 43
44#include "includes.h" 44#include "includes.h"
45RCSID("$OpenBSD: sshd.c,v 1.298 2004/07/11 17:48:47 deraadt Exp $"); 45RCSID("$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 */
217Authctxt *the_authctxt = NULL; 217Authctxt *the_authctxt = NULL;
218 218
219/* message to be displayed after login */
220Buffer loginmsg;
221
219/* Prototypes for various functions defined later in this file. */ 222/* Prototypes for various functions defined later in this file. */
220void destroy_sensitive_data(void); 223void destroy_sensitive_data(void);
221void demote_sensitive_data(void); 224void 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) {