summaryrefslogtreecommitdiffstats
path: root/x11vnc/x11vnc.c
diff options
context:
space:
mode:
authorrunge <runge>2007-02-19 22:57:44 +0000
committerrunge <runge>2007-02-19 22:57:44 +0000
commit23f6dc3da9bf9fc06a4ea8a5f0b2a6672aae65ba (patch)
tree418bba86bc5bdfbd2c40fb0073f168ab482c424e /x11vnc/x11vnc.c
parent23178cd162a5ee7372115c1f76fda6129b912b75 (diff)
downloadlibtdevnc-23f6dc3da9bf9fc06a4ea8a5f0b2a6672aae65ba.tar.gz
libtdevnc-23f6dc3da9bf9fc06a4ea8a5f0b2a6672aae65ba.zip
x11vnc: fix -users bob= in -inetd mode.
Diffstat (limited to 'x11vnc/x11vnc.c')
-rw-r--r--x11vnc/x11vnc.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/x11vnc/x11vnc.c b/x11vnc/x11vnc.c
index 38a1fe5..0b292ba 100644
--- a/x11vnc/x11vnc.c
+++ b/x11vnc/x11vnc.c
@@ -950,7 +950,18 @@ static void check_rcfile(int argc, char **argv) {
}
static void immediate_switch_user(int argc, char* argv[]) {
- int i;
+ int i, bequiet = 0;
+ for (i=1; i < argc; i++) {
+ if (strcmp(argv[i], "-inetd")) {
+ bequiet = 1;
+ }
+ if (strcmp(argv[i], "-quiet")) {
+ bequiet = 1;
+ }
+ if (strcmp(argv[i], "-q")) {
+ bequiet = 1;
+ }
+ }
for (i=1; i < argc; i++) {
char *u;
@@ -976,7 +987,9 @@ static void immediate_switch_user(int argc, char* argv[]) {
fprintf(stderr, "Could not switch to user: %s\n", u+1);
exit(1);
} else {
- fprintf(stderr, "Switched to user: %s\n", u+1);
+ if (!bequiet) {
+ fprintf(stderr, "Switched to user: %s\n", u+1);
+ }
started_as_root = 2;
}
free(u);