diff options
author | Matt Johnston <matt@ucc.asn.au> | 2008-09-12 17:23:56 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2008-09-12 17:23:56 +0000 |
commit | 31fa5e605b6d42d670945c1821caf8b887623fa1 (patch) | |
tree | af6c0d623d5a7c737d4b59c47d58e399c328b988 /svr-main.c | |
parent | c0ce2a6a97af66881675916c504af9caed2f9c2e (diff) | |
download | dropbear-31fa5e605b6d42d670945c1821caf8b887623fa1.tar.gz |
- Rework pubkey options to be more careful about buffer lengths. Needs review.
--HG--
branch : pubkey-options
extra : convert_revision : 537a6ebebb46424b967ffe787f0f8560e5f447e8
Diffstat (limited to 'svr-main.c')
-rw-r--r-- | svr-main.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -266,7 +266,11 @@ void main_noinetd() { goto out; } +#ifdef DEBUG_NOFORK + fork_ret = 0; +#else fork_ret = fork(); +#endif if (fork_ret < 0) { dropbear_log(LOG_WARNING, "error forking: %s", strerror(errno)); goto out; @@ -292,9 +296,11 @@ void main_noinetd() { addrstring = getaddrstring(&remoteaddr, 1); dropbear_log(LOG_INFO, "Child connection from %s", addrstring); +#ifndef DEBUG_NOFORK if (setsid() < 0) { dropbear_exit("setsid: %s", strerror(errno)); } +#endif /* make sure we close sockets */ for (i = 0; i < listensockcount; i++) { |