aboutsummaryrefslogtreecommitdiff
path: root/sslutils.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-01-07 21:21:20 -0800
committerGuy Harris <guy@alum.mit.edu>2019-01-07 21:21:20 -0800
commit941280a5cd6aefafa79ff4dd032c4467a42c1fd1 (patch)
tree8111ebfb42748bc11661700b92c39504e5d424cb /sslutils.h
parenta5f191481140b173ababa9f7dc425ef65bdab739 (diff)
Move the SSL setup and host/port list checking to daemon_serviceloop().
That: 1) arranges that it's done only in one code path; 2) arranges that it not be done in the main connection-accepting thread/process if this isn't an inetd-style daemon; 3) means that we're doing the host/port list checking in inetd-style daemons - we weren't doing it before; 4) means that we're doing both of them after we've turned off non-blocking mode on Windows, not before - doing it before may cause the SSL setup and sending a host/port list check error not to work (as we won't block waiting for input or waiting for buffer space to be available for output). Fix the file descriptor handling for inetd-style daemons while we're at it; we should redirect the standard error to /dev/null - it's not guaranteed to, for example, go to a daemon that reads your error messages and logs them, and it could be going over the connection, which would be a problem. Close the control socket with sock_close() after daemon_serviceloop() returns, in case shutting down the write side is necessary to have the connection shut down cleanly.
Diffstat (limited to 'sslutils.h')
0 files changed, 0 insertions, 0 deletions