diff options
Diffstat (limited to 'x11vnc/unixpw.c')
-rw-r--r-- | x11vnc/unixpw.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/x11vnc/unixpw.c b/x11vnc/unixpw.c index 4bca127..fae74a5 100644 --- a/x11vnc/unixpw.c +++ b/x11vnc/unixpw.c @@ -546,7 +546,13 @@ if (db) fprintf(stderr, "slave is: %s fd=%d\n", slave, fd); /* synchronize with parent: */ write(2, "C", 1); - execlp(bin_su, bin_su, user, "-c", bin_true, (char *) NULL); + if (cmd) { + execlp(bin_su, bin_su, "-", user, "-c", + bin_true, (char *) NULL); + } else { + execlp(bin_su, bin_su, user, "-c", + bin_true, (char *) NULL); + } exit(1); } /* parent */ |