diff options
author | runge <runge@karlrunge.com> | 2009-12-07 09:15:22 -0500 |
---|---|---|
committer | runge <runge@karlrunge.com> | 2009-12-07 09:15:22 -0500 |
commit | 8f5c9ef01ef9101cf8f8d8f1eacdaab27ac7c2c8 (patch) | |
tree | b56c0f6b003075bffc43cae033c647ab31eeff60 /x11vnc/remote.c | |
parent | 6153bd69835da0e7217ae844bdba4e2ba676f981 (diff) | |
download | libtdevnc-8f5c9ef01ef9101cf8f8d8f1eacdaab27ac7c2c8.tar.gz libtdevnc-8f5c9ef01ef9101cf8f8d8f1eacdaab27ac7c2c8.zip |
X11VNC_EXTRA_HTTPS_PARAMS, X11VNC_HTTP_LISTEN_LOCALHOST, X11VNC_REOPEN_SLEEP_MAX,
-findauth/-auth guess FD_XDM=1 for root, work around xhost SI:localuser:root.
Diffstat (limited to 'x11vnc/remote.c')
-rw-r--r-- | x11vnc/remote.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/x11vnc/remote.c b/x11vnc/remote.c index 356aa81..71abec8 100644 --- a/x11vnc/remote.c +++ b/x11vnc/remote.c @@ -469,6 +469,20 @@ int check_httpdir(void) { } } +static void rfb_http_init_sockets(void) { + in_addr_t iface; + if (!screen) { + return; + } + iface = screen->listenInterface; + if (getenv("X11VNC_HTTP_LISTEN_LOCALHOST")) { + rfbLog("http_connections: HTTP listen on localhost only. (not HTTPS)\n"); + screen->listenInterface = htonl(INADDR_LOOPBACK); + } + rfbHttpInitSockets(screen); + screen->listenInterface = iface; +} + void http_connections(int on) { if (!screen) { return; @@ -492,7 +506,7 @@ void http_connections(int on) { screen->httpInitDone = FALSE; if (check_httpdir()) { screen->httpDir = http_dir; - rfbHttpInitSockets(screen); + rfb_http_init_sockets(); if (screen->httpPort != 0 && screen->httpListenSock < 0) { rfbLog("http_connections: failed to listen on http port: %d\n", screen->httpPort); clean_up_exit(1); @@ -526,7 +540,7 @@ static void reset_httpport(int old, int new) { } rfbLog("reset_httpport: setting httpport %d -> %d.\n", old == -1 ? hp : old, hp); - rfbHttpInitSockets(screen); + rfb_http_init_sockets(); if (screen->httpPort != 0 && screen->httpListenSock < 0) { rfbLog("reset_httpport: failed to listen on http port: %d\n", screen->httpPort); } |