diff options
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshd.c,v 1.509 2018/07/03 11:39:54 djm Exp $ */ | 1 | /* $OpenBSD: sshd.c,v 1.510 2018/07/09 21:26:02 markus Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -240,7 +240,7 @@ struct sshauthopt *auth_opts = NULL; | |||
240 | Buffer cfg; | 240 | Buffer cfg; |
241 | 241 | ||
242 | /* message to be displayed after login */ | 242 | /* message to be displayed after login */ |
243 | Buffer loginmsg; | 243 | struct sshbuf *loginmsg; |
244 | 244 | ||
245 | /* Unprivileged user */ | 245 | /* Unprivileged user */ |
246 | struct passwd *privsep_pw = NULL; | 246 | struct passwd *privsep_pw = NULL; |
@@ -649,7 +649,7 @@ privsep_postauth(Authctxt *authctxt) | |||
649 | fatal("fork of unprivileged child failed"); | 649 | fatal("fork of unprivileged child failed"); |
650 | else if (pmonitor->m_pid != 0) { | 650 | else if (pmonitor->m_pid != 0) { |
651 | verbose("User child is on pid %ld", (long)pmonitor->m_pid); | 651 | verbose("User child is on pid %ld", (long)pmonitor->m_pid); |
652 | buffer_clear(&loginmsg); | 652 | sshbuf_reset(loginmsg); |
653 | monitor_clear_keystate(pmonitor); | 653 | monitor_clear_keystate(pmonitor); |
654 | monitor_child_postauth(pmonitor); | 654 | monitor_child_postauth(pmonitor); |
655 | 655 | ||
@@ -2119,7 +2119,8 @@ main(int ac, char **av) | |||
2119 | fatal("allocation failed"); | 2119 | fatal("allocation failed"); |
2120 | 2120 | ||
2121 | /* prepare buffer to collect messages to display to user after login */ | 2121 | /* prepare buffer to collect messages to display to user after login */ |
2122 | buffer_init(&loginmsg); | 2122 | if ((loginmsg = sshbuf_new()) == NULL) |
2123 | fatal("%s: sshbuf_new failed", __func__); | ||
2123 | auth_debug_reset(); | 2124 | auth_debug_reset(); |
2124 | 2125 | ||
2125 | if (use_privsep) { | 2126 | if (use_privsep) { |