Commit b49617923fadbe4429cbab8f4276a70ed0f73ab7
v1.2
Yves Rutschle committed on 7/10/2013, 9:07:20 PMParent: d0c0689e3ce9f57db360d5d1206090211ddd92c5
Files changed
sslh.c | changed |
sslh.c | ||
---|---|---|
@@ -1,8 +1,8 @@ | ||
1 | 1 | /* |
2 | 2 | Reimplementation of sslh in C |
3 | 3 | |
4 | -# Copyright (C) 2007 Yves Rutschle | |
4 | +# Copyright (C) 2007-2008 Yves Rutschle | |
5 | 5 | # |
6 | 6 | # This program is free software; you can redistribute it |
7 | 7 | |
8 | 8 | # License as published by the Free Software Foundation; either |
@@ -29,8 +29,11 @@ | ||
29 | 29 | gcc -o tcproxy tcproxy.c -lnetinet |
30 | 30 | |
31 | 31 | HISTORY |
32 | 32 | |
33 | +v1.2: 12MAY2008 | |
34 | + Fixed compilation warning for AMD64 (Thx Daniel Lange) | |
35 | + | |
33 | 36 | v1.1: 21MAY2007 |
34 | 37 | Making sslhc more like a real daemon: |
35 | 38 | * If $PIDFILE is defined, write first PID to it upon startup |
36 | 39 | * Fork at startup (detach from terminal) |
@@ -42,9 +45,9 @@ | ||
42 | 45 | configurable. |
43 | 46 | |
44 | 47 | */ |
45 | 48 | |
46 | - | |
49 | + | |
47 | 50 | |
48 | 51 | |
49 | 52 | |
50 | 53 | |
@@ -64,10 +67,12 @@ | ||
64 | 67 | perror(str); \ |
65 | 68 | exit(1); \ |
66 | 69 | } |
67 | 70 | |
68 | - | |
69 | -"\texport PIDFILE=/var/run/sslhc.pid" \ | |
71 | + | |
72 | +"sslh v" VERSION "\n" \ | |
73 | +"usage:\n" \ | |
74 | +"\texport PIDFILE=/var/run/sslhc.pid\n" \ | |
70 | 75 | "\tsslh [-t <timeout>] -u <username> -p <listenport> -s [sshhost:]port -l [sslhost:]port [-v]\n" |
71 | 76 | |
72 | 77 | int verbose = 0; /* That's really quite global */ |
73 | 78 | |
@@ -278,12 +283,15 @@ | ||
278 | 283 | wait(NULL); |
279 | 284 | } |
280 | 285 | void setup_signals(void) |
281 | 286 | { |
282 | - int res; | |
287 | + void* res; | |
283 | 288 | |
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 | + } | |
286 | 294 | } |
287 | 295 | |
288 | 296 | |
289 | 297 | /* We don't want to run as root -- drop priviledges if required */ |
Built with git-ssb-web