diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2005-10-31 03:49:25 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2005-10-31 03:49:25 +0000 |
commit | 79df31c85ab06d24f9443e370160cc9c44b88b93 (patch) | |
tree | b3f92140b9c210485c2c0caad578c844791f3bcb /init.c | |
parent | Windows reliability changes: (diff) | |
download | openvpn-79df31c85ab06d24f9443e370160cc9c44b88b93.tar.xz |
svn merge -r 734:737 $SO/trunk/openvpn
Security fixes from 2.0.3
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@740 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'init.c')
-rw-r--r-- | init.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -2682,7 +2682,7 @@ inherit_context_child (struct context *dest, #endif /* context init */ - init_instance (dest, src->c2.es, CC_USR1_TO_HUP | CC_GC_FREE); + init_instance (dest, src->c2.es, CC_NO_CLOSE | CC_USR1_TO_HUP); if (IS_SIG (dest)) return; @@ -2756,6 +2756,9 @@ inherit_context_top (struct context *dest, void close_context (struct context *c, int sig, unsigned int flags) { + ASSERT (c); + ASSERT (c->sig); + if (sig >= 0) c->sig->signal_received = sig; @@ -2766,7 +2769,8 @@ close_context (struct context *c, int sig, unsigned int flags) c->sig->signal_received = SIGHUP; } - close_instance (c); + if (!(flags & CC_NO_CLOSE)) + close_instance (c); if (flags & CC_GC_FREE) context_gc_free (c); |