summaryrefslogtreecommitdiffstats
path: root/x11vnc/x11vnc.c
diff options
context:
space:
mode:
Diffstat (limited to 'x11vnc/x11vnc.c')
-rw-r--r--x11vnc/x11vnc.c31
1 files changed, 25 insertions, 6 deletions
diff --git a/x11vnc/x11vnc.c b/x11vnc/x11vnc.c
index cbaa32b..9795dd3 100644
--- a/x11vnc/x11vnc.c
+++ b/x11vnc/x11vnc.c
@@ -4093,6 +4093,12 @@ int main(int argc, char* argv[]) {
"mode\n");
}
bg = 0;
+ } else if (!bg && getenv("X11VNC_LOOP_MODE_BG")) {
+ if (! quiet) {
+ fprintf(stderr, "enabling -bg in -loopbg "
+ "mode\n");
+ }
+ bg = 1;
}
if (inetd) {
if (! quiet) {
@@ -4591,10 +4597,18 @@ int main(int argc, char* argv[]) {
use_stunnel = 0;
}
if (! use_stunnel && ! use_openssl) {
- if (getenv("UNIXPW_DISABLE_LOCALHOST")) {
+ if (getenv("UNIXPW_DISABLE_SSL")) {
rfbLog("Skipping -ssl/-stunnel requirement"
" due to\n");
- rfbLog("UNIXPW_DISABLE_LOCALHOST setting.\n");
+ rfbLog("UNIXPW_DISABLE_SSL setting.\n");
+
+ if (!getenv("UNIXPW_DISABLE_LOCALHOST")) {
+ if (!got_localhost) {
+ rfbLog("Forcing -localhost mode.\n");
+ }
+ allow_list = strdup("127.0.0.1");
+ got_localhost = 1;
+ }
} else if (have_ssh_env()) {
char *s = getenv("SSH_CONNECTION");
if (! s) s = getenv("SSH_CLIENT");
@@ -4605,13 +4619,18 @@ int main(int argc, char* argv[]) {
rfbLog("assuming your SSH encryption"
" is:\n");
rfbLog(" %s\n", s);
- rfbLog("Setting -localhost in SSH + -unixpw"
- " mode.\n");
+
+ if (!getenv("UNIXPW_DISABLE_LOCALHOST")) {
+ if (!got_localhost) {
+ rfbLog("Setting -localhost in SSH + -unixpw mode.\n");
+ }
+ allow_list = strdup("127.0.0.1");
+ got_localhost = 1;
+ }
+
rfbLog("If you *actually* want SSL, restart"
" with -ssl on the cmdline\n");
fprintf(stderr, "\n");
- allow_list = strdup("127.0.0.1");
- got_localhost = 1;
if (! nopw) {
usleep(2000*1000);
}