From 8f5c9ef01ef9101cf8f8d8f1eacdaab27ac7c2c8 Mon Sep 17 00:00:00 2001 From: runge Date: Mon, 7 Dec 2009 09:15:22 -0500 Subject: 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. --- x11vnc/remote.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'x11vnc/remote.c') 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); } -- cgit v1.2.1