- djm@cvs.openbsd.org 2010/11/25 04:10:09
[session.c] replace close() loop for fds 3->64 with closefrom(); ok markus deraadt dtucker
This commit is contained in:
parent
b7f827ae45
commit
f80c3deaaf
|
@ -25,6 +25,10 @@
|
|||
remove a debug() that pollutes stderr on client connecting to a server
|
||||
in debug mode (channel_close_fds is called transitively from the session
|
||||
code post-fork); bz#1719, ok dtucker
|
||||
- djm@cvs.openbsd.org 2010/11/25 04:10:09
|
||||
[session.c]
|
||||
replace close() loop for fds 3->64 with closefrom();
|
||||
ok markus deraadt dtucker
|
||||
|
||||
20101124
|
||||
- (dtucker) [platform.c session.c] Move the getluid call out of session.c and
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: session.c,v 1.257 2010/11/13 23:27:50 djm Exp $ */
|
||||
/* $OpenBSD: session.c,v 1.258 2010/11/25 04:10:09 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
* All rights reserved
|
||||
|
@ -1569,8 +1569,6 @@ launch_login(struct passwd *pw, const char *hostname)
|
|||
static void
|
||||
child_close_fds(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (packet_get_connection_in() == packet_get_connection_out())
|
||||
close(packet_get_connection_in());
|
||||
else {
|
||||
|
@ -1596,8 +1594,7 @@ child_close_fds(void)
|
|||
* initgroups, because at least on Solaris 2.3 it leaves file
|
||||
* descriptors open.
|
||||
*/
|
||||
for (i = 3; i < 64; i++)
|
||||
close(i);
|
||||
closefrom(STDERR_FILENO + 1);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue