diff options
author | runge <runge> | 2007-02-12 02:42:28 +0000 |
---|---|---|
committer | runge <runge> | 2007-02-12 02:42:28 +0000 |
commit | 0016cd4280ee9a0d088454a508a9c7f6bde33f62 (patch) | |
tree | 41614a1dfbd8bba02f35a588e8cc87d4e7692173 /x11vnc/user.c | |
parent | 90d96b971f04b11fe1902091a94be94697738766 (diff) | |
download | libtdevnc-0016cd4280ee9a0d088454a508a9c7f6bde33f62.tar.gz libtdevnc-0016cd4280ee9a0d088454a508a9c7f6bde33f62.zip |
x11vnc: -grabalways, -forcedpms, -clientdpms, -noserverdpms, -loopbg, -svc, -xdmsvc
Diffstat (limited to 'x11vnc/user.c')
-rw-r--r-- | x11vnc/user.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/x11vnc/user.c b/x11vnc/user.c index 4250938..7124092 100644 --- a/x11vnc/user.c +++ b/x11vnc/user.c @@ -1404,6 +1404,7 @@ int wait_for_client(int *argc, char** argv, int http) { break; } + if (unixpw) { if (! unixpw_in_progress) { rfbLog("unixpw but no unixpw_in_progress\n"); @@ -1517,12 +1518,15 @@ if (db) {fprintf(stderr, "line: "); write(2, line, n); write(2, "\n", 1); fprint fprintf(mt, "%s", create_display); fclose(mt); + findcreatedisplay = 1; + if (getuid() != 0) { /* if not root, run as the other user... */ n = 18000; + close_exec_fds(); res = su_verify(keep_unixpw_user, keep_unixpw_pass, create_cmd, line, &n, nodisp); -if (db) fprintf(stderr, "line: '%s'\n", line); +if (db) fprintf(stderr, "c-res=%d n=%d line: '%s'\n", res, n, line); } else { FILE *p; @@ -1633,6 +1637,8 @@ if (db) fprintf(stderr, "\n"); fprintf(mt, "%s", create_display); fclose(mt); + findcreatedisplay = 1; + rfbLog("wait_for_client: FINDCREATEDISPLAY cmd: %s\n", create_cmd); p = popen(create_cmd, "r"); @@ -1772,7 +1778,7 @@ fprintf(stderr, "\n");} } else if (switch_user(u, 0)) { rfbLog("unixpw_accept switched to user: %s\n", user); } else { - rfbLog("unixpw_accept failed to switched to user: %s\n", user); + rfbLog("unixpw_accept failed to switch to user: %s\n", user); } free(u); } |