summaryrefslogtreecommitdiffstats
path: root/x11vnc/xevents.c
diff options
context:
space:
mode:
Diffstat (limited to 'x11vnc/xevents.c')
-rw-r--r--x11vnc/xevents.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/x11vnc/xevents.c b/x11vnc/xevents.c
index 2f2e02b..bf1aa8d 100644
--- a/x11vnc/xevents.c
+++ b/x11vnc/xevents.c
@@ -1401,10 +1401,22 @@ int get_keyboard_led_state_hook(rfbScreenInfoPtr s) {
return 0;
}
int get_file_transfer_permitted(rfbClientPtr cl) {
+ allowed_input_t input;
if (unixpw_in_progress) {
rfbLog("get_file_transfer_permitted: unixpw_in_progress, skipping.\n");
return FALSE;
}
+if (0) fprintf(stderr, "get_file_transfer_permitted called\n");
+ if (view_only) {
+ return FALSE;
+ }
+ if (cl->viewOnly) {
+ return FALSE;
+ }
+ get_allowed_input(cl, &input);
+ if (!input.files) {
+ return FALSE;
+ }
return screen->permitFileTransfer;
}