git ssb

0+

cel / sslh



Commit b49617923fadbe4429cbab8f4276a70ed0f73ab7

v1.2

Yves Rutschle committed on 7/10/2013, 9:07:20 PM
Parent: d0c0689e3ce9f57db360d5d1206090211ddd92c5

Files changed

sslh.cchanged
sslh.cView
@@ -1,8 +1,8 @@
11 /*
22 Reimplementation of sslh in C
33
4-# Copyright (C) 2007 Yves Rutschle
4+# Copyright (C) 2007-2008 Yves Rutschle
55 #
66 # This program is free software; you can redistribute it
77 # and/or modify it under the terms of the GNU General Public
88 # License as published by the Free Software Foundation; either
@@ -29,8 +29,11 @@
2929 gcc -o tcproxy tcproxy.c -lnetinet
3030
3131 HISTORY
3232
33+v1.2: 12MAY2008
34+ Fixed compilation warning for AMD64 (Thx Daniel Lange)
35+
3336 v1.1: 21MAY2007
3437 Making sslhc more like a real daemon:
3538 * If $PIDFILE is defined, write first PID to it upon startup
3639 * Fork at startup (detach from terminal)
@@ -42,9 +45,9 @@
4245 configurable.
4346
4447 */
4548
46-#define VERSION "1.1"
49+#define VERSION "1.2"
4750
4851 #include <sys/types.h>
4952 #include <fcntl.h>
5053 #include <string.h>
@@ -64,10 +67,12 @@
6467 perror(str); \
6568 exit(1); \
6669 }
6770
68-#define USAGE_STRING "usage:\n" \
69-"\texport PIDFILE=/var/run/sslhc.pid" \
71+#define USAGE_STRING \
72+"sslh v" VERSION "\n" \
73+"usage:\n" \
74+"\texport PIDFILE=/var/run/sslhc.pid\n" \
7075 "\tsslh [-t <timeout>] -u <username> -p <listenport> -s [sshhost:]port -l [sslhost:]port [-v]\n"
7176
7277 int verbose = 0; /* That's really quite global */
7378
@@ -278,12 +283,15 @@
278283 wait(NULL);
279284 }
280285 void setup_signals(void)
281286 {
282- int res;
287+ void* res;
283288
284- res = (int)signal(SIGCHLD, &child_handler);
285- CHECK_RES_DIE(res, "signal");
289+ res = signal(SIGCHLD, &child_handler);
290+ if (res == SIG_ERR) {
291+ perror("signal");
292+ exit(1);
293+ }
286294 }
287295
288296
289297 /* We don't want to run as root -- drop priviledges if required */

Built with git-ssb-web