summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2005-01-24 21:55:49 +1100
committerDarren Tucker <dtucker@zip.com.au>2005-01-24 21:55:49 +1100
commit5c14c734295b9a30d71d110deb8307d5610d4c01 (patch)
treeb85c556b9cbaddf752df3fb9e95592d652b3d357 /sshd.c
parent3c66080aa26e5121805c80728a9c801b08a7870e (diff)
- otto@cvs.openbsd.org 2005/01/21 08:32:02
[auth-passwd.c sshd.c] Warn in advance for password and account expiry; initialize loginmsg buffer earlier and clear it after privsep fork. ok and help dtucker@ markus@
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sshd.c b/sshd.c
index 76aec80b0..7f268526f 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.306 2005/01/17 22:48:39 dtucker Exp $"); 45RCSID("$OpenBSD: sshd.c,v 1.307 2005/01/21 08:32:02 otto Exp $");
46 46
47#include <openssl/dh.h> 47#include <openssl/dh.h>
48#include <openssl/bn.h> 48#include <openssl/bn.h>
@@ -1664,9 +1664,6 @@ main(int ac, char **av)
1664 1664
1665 packet_set_nonblocking(); 1665 packet_set_nonblocking();
1666 1666
1667 /* prepare buffers to collect authentication messages */
1668 buffer_init(&loginmsg);
1669
1670 /* allocate authentication context */ 1667 /* allocate authentication context */
1671 authctxt = xmalloc(sizeof(*authctxt)); 1668 authctxt = xmalloc(sizeof(*authctxt));
1672 memset(authctxt, 0, sizeof(*authctxt)); 1669 memset(authctxt, 0, sizeof(*authctxt));
@@ -1674,13 +1671,13 @@ main(int ac, char **av)
1674 /* XXX global for cleanup, access from other modules */ 1671 /* XXX global for cleanup, access from other modules */
1675 the_authctxt = authctxt; 1672 the_authctxt = authctxt;
1676 1673
1674 /* prepare buffer to collect messages to display to user after login */
1675 buffer_init(&loginmsg);
1676
1677 if (use_privsep) 1677 if (use_privsep)
1678 if (privsep_preauth(authctxt) == 1) 1678 if (privsep_preauth(authctxt) == 1)
1679 goto authenticated; 1679 goto authenticated;
1680 1680
1681 /* prepare buffer to collect messages to display to user after login */
1682 buffer_init(&loginmsg);
1683
1684 /* perform the key exchange */ 1681 /* perform the key exchange */
1685 /* authenticate user and start session */ 1682 /* authenticate user and start session */
1686 if (compat20) { 1683 if (compat20) {