summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2019-01-19 21:43:07 +0000
committerDamien Miller <djm@mindrot.org>2019-01-20 09:45:18 +1100
commitec00f918b8ad90295044266c433340a8adc93452 (patch)
tree445c6ca9d5f6e17cdd7ddc891816dd03d0266872 /sshd.c
parent6350e0316981489d4205952d6904d6fedba5bfe0 (diff)
upstream: convert monitor.c to new packet API
with & ok markus@ OpenBSD-Commit-ID: 61ecd154bd9804461a0cf5f495a29d919e0014d5
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sshd.c b/sshd.c
index 9dbb09c6d..0c93f7f31 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshd.c,v 1.525 2019/01/19 21:42:30 djm Exp $ */ 1/* $OpenBSD: sshd.c,v 1.526 2019/01/19 21:43:07 djm 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
@@ -459,7 +459,6 @@ privsep_preauth_child(void)
459static int 459static int
460privsep_preauth(struct ssh *ssh) 460privsep_preauth(struct ssh *ssh)
461{ 461{
462 Authctxt *authctxt = (Authctxt *)ssh->authctxt;
463 int status, r; 462 int status, r;
464 pid_t pid; 463 pid_t pid;
465 struct ssh_sandbox *box = NULL; 464 struct ssh_sandbox *box = NULL;
@@ -488,7 +487,7 @@ privsep_preauth(struct ssh *ssh)
488 } 487 }
489 if (box != NULL) 488 if (box != NULL)
490 ssh_sandbox_parent_preauth(box, pid); 489 ssh_sandbox_parent_preauth(box, pid);
491 monitor_child_preauth(authctxt, pmonitor); 490 monitor_child_preauth(ssh, pmonitor);
492 491
493 /* Wait for the child's exit status */ 492 /* Wait for the child's exit status */
494 while (waitpid(pid, &status, 0) < 0) { 493 while (waitpid(pid, &status, 0) < 0) {
@@ -548,8 +547,8 @@ privsep_postauth(struct ssh *ssh, Authctxt *authctxt)
548 else if (pmonitor->m_pid != 0) { 547 else if (pmonitor->m_pid != 0) {
549 verbose("User child is on pid %ld", (long)pmonitor->m_pid); 548 verbose("User child is on pid %ld", (long)pmonitor->m_pid);
550 sshbuf_reset(loginmsg); 549 sshbuf_reset(loginmsg);
551 monitor_clear_keystate(pmonitor); 550 monitor_clear_keystate(ssh, pmonitor);
552 monitor_child_postauth(pmonitor); 551 monitor_child_postauth(ssh, pmonitor);
553 552
554 /* NEVERREACHED */ 553 /* NEVERREACHED */
555 exit(0); 554 exit(0);
@@ -570,7 +569,7 @@ privsep_postauth(struct ssh *ssh, Authctxt *authctxt)
570 569
571 skip: 570 skip:
572 /* It is safe now to apply the key state */ 571 /* It is safe now to apply the key state */
573 monitor_apply_keystate(pmonitor); 572 monitor_apply_keystate(ssh, pmonitor);
574 573
575 /* 574 /*
576 * Tell the packet layer that authentication was successful, since 575 * Tell the packet layer that authentication was successful, since