mirror of
https://github.com/clearml/dropbear
synced 2025-06-26 18:17:32 +00:00
merge of 4c883eb469d2d251ee8abddbc11ae4005db6da17
and bed6155e95a293c9fce7e889d283b5958f3035dc --HG-- extra : convert_revision : fff0894a0399405a9410ea1c6d118f342cf2aa64
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user