mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-25 14:54:45 +02:00
- markus@cvs.openbsd.org 2012/12/11 22:16:21
[monitor.c] drain the log messages after receiving the keystate from the unpriv child. otherwise it might block while sending. ok djm@
This commit is contained in:
parent
3e1027cd1f
commit
6a1937eac5
@ -1,3 +1,10 @@
|
|||||||
|
20121212
|
||||||
|
- (djm) OpenBSD CVS Sync
|
||||||
|
- markus@cvs.openbsd.org 2012/12/11 22:16:21
|
||||||
|
[monitor.c]
|
||||||
|
drain the log messages after receiving the keystate from the unpriv
|
||||||
|
child. otherwise it might block while sending. ok djm@
|
||||||
|
|
||||||
20121207
|
20121207
|
||||||
- (dtucker) OpenBSD CVS Sync
|
- (dtucker) OpenBSD CVS Sync
|
||||||
- dtucker@cvs.openbsd.org 2012/12/06 06:06:54
|
- dtucker@cvs.openbsd.org 2012/12/06 06:06:54
|
||||||
|
10
monitor.c
10
monitor.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: monitor.c,v 1.119 2012/12/02 20:34:10 djm Exp $ */
|
/* $OpenBSD: monitor.c,v 1.120 2012/12/11 22:16:21 markus Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
|
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
|
||||||
* Copyright 2002 Markus Friedl <markus@openbsd.org>
|
* Copyright 2002 Markus Friedl <markus@openbsd.org>
|
||||||
@ -438,10 +438,6 @@ monitor_child_preauth(Authctxt *_authctxt, struct monitor *pmonitor)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Drain any buffered messages from the child */
|
|
||||||
while (pmonitor->m_log_recvfd != -1 && monitor_read_log(pmonitor) == 0)
|
|
||||||
;
|
|
||||||
|
|
||||||
if (!authctxt->valid)
|
if (!authctxt->valid)
|
||||||
fatal("%s: authenticated invalid user", __func__);
|
fatal("%s: authenticated invalid user", __func__);
|
||||||
if (strcmp(auth_method, "unknown") == 0)
|
if (strcmp(auth_method, "unknown") == 0)
|
||||||
@ -452,6 +448,10 @@ monitor_child_preauth(Authctxt *_authctxt, struct monitor *pmonitor)
|
|||||||
|
|
||||||
mm_get_keystate(pmonitor);
|
mm_get_keystate(pmonitor);
|
||||||
|
|
||||||
|
/* Drain any buffered messages from the child */
|
||||||
|
while (pmonitor->m_log_recvfd != -1 && monitor_read_log(pmonitor) == 0)
|
||||||
|
;
|
||||||
|
|
||||||
close(pmonitor->m_sendfd);
|
close(pmonitor->m_sendfd);
|
||||||
close(pmonitor->m_log_recvfd);
|
close(pmonitor->m_log_recvfd);
|
||||||
pmonitor->m_sendfd = pmonitor->m_log_recvfd = -1;
|
pmonitor->m_sendfd = pmonitor->m_log_recvfd = -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user