comparison svr-chansession.c @ 279:1f5ec029dfe8

merge of 4c883eb469d2d251ee8abddbc11ae4005db6da17 and bed6155e95a293c9fce7e889d283b5958f3035dc
author Matt Johnston <matt@ucc.asn.au>
date Wed, 08 Mar 2006 12:53:11 +0000
parents 8438ff0cdb74 044bc108b9b3
children 5d5bbca82aba 3eea61bd9993 dba106bf6b34 8eaa6e3ca6eb
comparison
equal deleted inserted replaced
278:e109fb08b8ee 279:1f5ec029dfe8
849 #endif 849 #endif
850 850
851 /* close file descriptors except stdin/stdout/stderr 851 /* close file descriptors except stdin/stdout/stderr
852 * Need to be sure FDs are closed here to avoid reading files as root */ 852 * Need to be sure FDs are closed here to avoid reading files as root */
853 for (i = 3; i <= (unsigned int)ses.maxfd; i++) { 853 for (i = 3; i <= (unsigned int)ses.maxfd; i++) {
854 if (m_close(i) == DROPBEAR_FAILURE) { 854 m_close(i);
855 dropbear_exit("Error closing file desc");
856 }
857 } 855 }
858 856
859 /* clear environment */ 857 /* clear environment */
860 /* if we're debugging using valgrind etc, we need to keep the LD_PRELOAD 858 /* if we're debugging using valgrind etc, we need to keep the LD_PRELOAD
861 * etc. This is hazardous, so should only be used for debugging. */ 859 * etc. This is hazardous, so should only be used for debugging. */