[sslh] OpenBSD support (1.10 throws SEGV under OpenBSD 5.0)

Yves Rutschle yves at naryves.com
Wed Jan 11 10:26:32 CET 2012


On Wed, Jan 11, 2012 at 09:43:55AM +0100, Walter Haidinger wrote:
> I haven't digged further why the listener_pid array is empty, though.

Becasue the code is horribly wrong, and works in Linux and
FreeBSD just out of luck. How about with:

--- sslh-fork.c (revision 95)
+++ sslh-fork.c (working copy)
@@ -138,6 +138,7 @@
     int in_socket, i, res;
     struct sigaction action;

+    listener_pid_number = num_addr_listen;
     listener_pid = malloc(listener_pid_number * sizeof(listener_pid[0]));

     /* Start one process for each listening address */
@@ -170,7 +171,6 @@
     res = sigaction(SIGTERM, &action, NULL);
     CHECK_RES_DIE(res, "sigaction");

-    listener_pid_number = num_addr_listen;
     wait(NULL);
 }


Y.




More information about the sslh mailing list