merge of 4c883eb469d2d251ee8abddbc11ae4005db6da17

and bed6155e95a293c9fce7e889d283b5958f3035dc

--HG--
extra : convert_revision : fff0894a0399405a9410ea1c6d118f342cf2aa64
This commit is contained in:
Matt Johnston
2006-03-08 12:53:11 +00:00
5 changed files with 80 additions and 52 deletions

View File

@@ -851,9 +851,7 @@ static void execchild(struct ChanSess *chansess) {
/* close file descriptors except stdin/stdout/stderr
* Need to be sure FDs are closed here to avoid reading files as root */
for (i = 3; i <= (unsigned int)ses.maxfd; i++) {
if (m_close(i) == DROPBEAR_FAILURE) {
dropbear_exit("Error closing file desc");
}
m_close(i);
}
/* clear environment */