Mercurial > dropbear
comparison svr-chansession.c @ 277:044bc108b9b3
* Per-IP connection unauthed connection limits
* m_close() exits fatally on failure
* other cleanups
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 08 Mar 2006 12:41:27 +0000 |
parents | 541b14504870 |
children | 1f5ec029dfe8 |
comparison
equal
deleted
inserted
replaced
266:e37b160c414c | 277:044bc108b9b3 |
---|---|
836 seedrandom(); | 836 seedrandom(); |
837 | 837 |
838 /* close file descriptors except stdin/stdout/stderr | 838 /* close file descriptors except stdin/stdout/stderr |
839 * Need to be sure FDs are closed here to avoid reading files as root */ | 839 * Need to be sure FDs are closed here to avoid reading files as root */ |
840 for (i = 3; i <= (unsigned int)ses.maxfd; i++) { | 840 for (i = 3; i <= (unsigned int)ses.maxfd; i++) { |
841 if (m_close(i) == DROPBEAR_FAILURE) { | 841 m_close(i); |
842 dropbear_exit("Error closing file desc"); | |
843 } | |
844 } | 842 } |
845 | 843 |
846 /* clear environment */ | 844 /* clear environment */ |
847 /* if we're debugging using valgrind etc, we need to keep the LD_PRELOAD | 845 /* if we're debugging using valgrind etc, we need to keep the LD_PRELOAD |
848 * etc. This is hazardous, so should only be used for debugging. */ | 846 * etc. This is hazardous, so should only be used for debugging. */ |