comparison svr-chansession.c @ 302:973fccb59ea4 ucc-axis-hack

propagate from branch 'au.asn.ucc.matt.dropbear' (head 11034278bd1917bebcbdc69cf53b1891ce9db121) to branch 'au.asn.ucc.matt.dropbear.ucc-axis-hack' (head 10a1f614fec73d0820c3f61160d9db409b9beb46)
author Matt Johnston <matt@ucc.asn.au>
date Sat, 25 Mar 2006 12:59:58 +0000
parents 1f5ec029dfe8
children 5d5bbca82aba 3eea61bd9993 dba106bf6b34 8eaa6e3ca6eb
comparison
equal deleted inserted replaced
299:740e782679be 302:973fccb59ea4
843 /* wipe the hostkey */ 843 /* wipe the hostkey */
844 sign_key_free(svr_opts.hostkey); 844 sign_key_free(svr_opts.hostkey);
845 svr_opts.hostkey = NULL; 845 svr_opts.hostkey = NULL;
846 846
847 /* overwrite the prng state */ 847 /* overwrite the prng state */
848 seedrandom(); 848 reseedrandom();
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. */