summaryrefslogtreecommitdiffstats
path: root/x11vnc/keyboard.c
diff options
context:
space:
mode:
authorrunge <runge>2006-07-04 23:04:30 +0000
committerrunge <runge>2006-07-04 23:04:30 +0000
commit93ca945acb85760ce3661debf5badb570ffe0454 (patch)
treeb69a65e1258f2da9eea881b4f4db042fa75915d6 /x11vnc/keyboard.c
parent1b51530afbc5dff413ea0090834d92e1d96e96e9 (diff)
downloadlibtdevnc-93ca945acb85760ce3661debf5badb570ffe0454.tar.gz
libtdevnc-93ca945acb85760ce3661debf5badb570ffe0454.zip
x11vnc: plug a couple unixpw gaps.
Diffstat (limited to 'x11vnc/keyboard.c')
-rw-r--r--x11vnc/keyboard.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/x11vnc/keyboard.c b/x11vnc/keyboard.c
index d056d05..a8760d1 100644
--- a/x11vnc/keyboard.c
+++ b/x11vnc/keyboard.c
@@ -2627,13 +2627,25 @@ void keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) {
char *str;
X_LOCK;
str = XKeysymToString(keysym);
- rfbLog("# keyboard(%s, 0x%x \"%s\") %.4f\n", down ? "down":"up",
- (int) keysym, str ? str : "null", tnow - x11vnc_start);
X_UNLOCK;
+ rfbLog("# keyboard(%s, 0x%x \"%s\") uip=%d %.4f\n",
+ down ? "down":"up", (int) keysym, str ? str : "null",
+ unixpw_in_progress, tnow - x11vnc_start);
+ }
+
+ if (keysym <= 0) {
+ rfbLog("keyboard: skipping 0x0 keysym\n");
+ return;
}
if (unixpw && unixpw_in_progress) {
+ if (unixpw_denied) {
+ rfbLog("keyboard: ignoring keystroke 0x%x in "
+ "unixpw_denied=1 state\n", (int) keysym);
+ return;
+ }
if (client != unixpw_client) {
+ rfbLog("keyboard: skipping other client in unixpw\n");
return;
}
unixpw_keystroke(down, keysym, 0);