summaryrefslogtreecommitdiffstats
path: root/x11vnc/unixpw.c
diff options
context:
space:
mode:
authorrunge <runge>2006-06-09 22:36:41 +0000
committerrunge <runge>2006-06-09 22:36:41 +0000
commit7a3e236390501c14b9d75d80ea88f8a3e69a337a (patch)
tree02c71ad3e894e49d6c0a591ae785bb96f4e39593 /x11vnc/unixpw.c
parent1776a3a55f59052bd69509c889e4370973305f0d (diff)
downloadlibvncserver-7a3e236390501c14b9d75d80ea88f8a3e69a337a.zip
libvncserver-7a3e236390501c14b9d75d80ea88f8a3e69a337a.tar.gz
x11vnc: make -display WAIT + -unixpw work on Solaris.
Diffstat (limited to 'x11vnc/unixpw.c')
-rw-r--r--x11vnc/unixpw.c8
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 */
OpenPOWER on IntegriCloud