diff options
| author | runge <runge@karlrunge.com> | 2009-12-18 11:46:10 -0500 |
|---|---|---|
| committer | runge <runge@karlrunge.com> | 2009-12-18 11:46:10 -0500 |
| commit | 06987b1c0216429e6744bf5a2c306d0e6853f879 (patch) | |
| tree | f2a3f6e24d5742c4297130cdfc5673550ca53bae /x11vnc/x11vnc.c | |
| parent | d6c012e9688d32d80c288541615c01cd082ecf0a (diff) | |
| download | libtdevnc-06987b1c0216429e6744bf5a2c306d0e6853f879.tar.gz libtdevnc-06987b1c0216429e6744bf5a2c306d0e6853f879.zip | |
x11vnc: fix keycode and other remote control actions under
DIRECT: with an extra XFlush and other safety measures.
fflush(stderr) much in su_verify. Make the -unixpw env. vars
UNIXPW_DISABLE_SSL and UNIXPW_DISABLE_LOCALHOST work correctly.
Make -loopbg actually imply -bg.
Diffstat (limited to 'x11vnc/x11vnc.c')
| -rw-r--r-- | x11vnc/x11vnc.c | 31 |
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); } |
