summaryrefslogtreecommitdiffstats
path: root/x11vnc/sslhelper.c
diff options
context:
space:
mode:
authorrunge <runge>2006-09-21 02:11:14 +0000
committerrunge <runge>2006-09-21 02:11:14 +0000
commitdea53c22101473a58bfb113529713383203c80df (patch)
tree7f1bac1c1efbd1dc644853c6758199d2d7a187c5 /x11vnc/sslhelper.c
parent52ed38f64789b9500d3d2e8b616aa5d1a01d5c57 (diff)
downloadlibtdevnc-dea53c22101473a58bfb113529713383203c80df.tar.gz
libtdevnc-dea53c22101473a58bfb113529713383203c80df.zip
x11vnc: -unixpw_cmd, -passwfile cmd:/custom:, -sslnofail, -ultrafilexfer
Diffstat (limited to 'x11vnc/sslhelper.c')
-rw-r--r--x11vnc/sslhelper.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/x11vnc/sslhelper.c b/x11vnc/sslhelper.c
index abd0a77..83a9f38 100644
--- a/x11vnc/sslhelper.c
+++ b/x11vnc/sslhelper.c
@@ -1326,6 +1326,9 @@ void accept_openssl(int mode) {
if (sock < 0) {
rfbLog("SSL: accept_openssl: accept connection failed\n");
rfbLogPerror("accept");
+ if (ssl_no_fail) {
+ clean_up_exit(1);
+ }
return;
}
listen = openssl_sock;
@@ -1335,6 +1338,9 @@ void accept_openssl(int mode) {
if (sock < 0) {
rfbLog("SSL: accept_openssl: accept connection failed\n");
rfbLogPerror("accept");
+ if (ssl_no_fail) {
+ clean_up_exit(1);
+ }
return;
}
listen = https_sock;
@@ -1357,7 +1363,7 @@ void accept_openssl(int mode) {
if (! cport) {
rfbLog("SSL: accept_openssl: could not find open port.\n");
close(sock);
- if (mode == OPENSSL_INETD) {
+ if (mode == OPENSSL_INETD || ssl_no_fail) {
clean_up_exit(1);
}
return;
@@ -1370,7 +1376,7 @@ void accept_openssl(int mode) {
rfbLog("SSL: accept_openssl: could not listen on port %d.\n",
cport);
close(sock);
- if (mode == OPENSSL_INETD) {
+ if (mode == OPENSSL_INETD || ssl_no_fail) {
clean_up_exit(1);
}
return;
@@ -1416,7 +1422,7 @@ void accept_openssl(int mode) {
rfbLogPerror("fork");
close(sock);
close(csock);
- if (mode == OPENSSL_INETD) {
+ if (mode == OPENSSL_INETD || ssl_no_fail) {
clean_up_exit(1);
}
return;
@@ -1721,7 +1727,7 @@ if (db) fprintf(stderr, "iface: %s\n", iface);
kill(pid, SIGTERM);
waitpid(pid, &status, WNOHANG);
- if (mode == OPENSSL_INETD) {
+ if (mode == OPENSSL_INETD || ssl_no_fail) {
clean_up_exit(1);
}
return;
@@ -1787,7 +1793,7 @@ if (db) fprintf(stderr, "iface: %s\n", iface);
}
kill(pid, SIGTERM);
waitpid(pid, &status, WNOHANG);
- if (mode == OPENSSL_INETD) {
+ if (mode == OPENSSL_INETD || ssl_no_fail) {
clean_up_exit(1);
}
return;
@@ -1820,7 +1826,7 @@ if (db) fprintf(stderr, "iface: %s\n", iface);
kill(pid, SIGTERM);
waitpid(pid, &status, WNOHANG);
- if (mode == OPENSSL_INETD) {
+ if (mode == OPENSSL_INETD || ssl_no_fail) {
clean_up_exit(1);
}
return;