diff options
author | runge <runge> | 2006-09-15 15:26:40 +0000 |
---|---|---|
committer | runge <runge> | 2006-09-15 15:26:40 +0000 |
commit | be2b77f2f28cf195e2dfe3556b05b06d7d440f05 (patch) | |
tree | a1c074350c4ab5ead739739877becc74404ebeca /x11vnc/unixpw.c | |
parent | 130cf391b60b93f187152cc10f389106caf1cbeb (diff) | |
download | libtdevnc-be2b77f2f28cf195e2dfe3556b05b06d7d440f05.tar.gz libtdevnc-be2b77f2f28cf195e2dfe3556b05b06d7d440f05.zip |
x11vnc: clear DISPLAY for -unixpw su_verify, user supplied sig ignore.
Diffstat (limited to 'x11vnc/unixpw.c')
-rw-r--r-- | x11vnc/unixpw.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/x11vnc/unixpw.c b/x11vnc/unixpw.c index b482fc0..9804fe9 100644 --- a/x11vnc/unixpw.c +++ b/x11vnc/unixpw.c @@ -584,6 +584,11 @@ if (db) fprintf(stderr, "slave is: %s fd=%d\n", slave, fd); try_to_be_nobody(); #if LIBVNCSERVER_HAVE_GETUID + if (0 && db > 1) { + /* does not work, writes to pty... */ + fprintf(stderr, "getuid=%d geteuid=%d\n", + getuid(), geteuid()); + } if (getuid() == 0 || geteuid() == 0) { exit(1); } @@ -594,6 +599,11 @@ if (db) fprintf(stderr, "slave is: %s fd=%d\n", slave, fd); set_env("LC_ALL", "C"); set_env("LANG", "C"); set_env("SHELL", "/bin/sh"); + if (!cmd && getenv("DISPLAY")) { + /* this will cause timeout problems with pam_xauth */ + char *s = getenv("DISPLAY"); + if (s) *(s-2) = '_'; + } /* synchronize with parent: */ write(2, "C", 1); |