1 From 3e06d40029cfdce9d0f73d87cfd4edaf54be9c51 Mon Sep 17 00:00:00 2001
2 From: Jeriko One <jeriko.one@gmx.us>
3 Date: Thu, 2 Nov 2017 23:44:19 -0700
4 Subject: [PATCH] Check fname in recv_files sooner.
6 Signed-off-by: Baruch Siach <baruch@tkos.co.il>
8 Patch status: upstream commit 3e06d40029c
10 receiver.c | 12 ++++++------
11 1 file changed, 6 insertions(+), 6 deletions(-)
13 diff --git a/receiver.c b/receiver.c
14 index baae3a919cdd..9fdafa152cb3 100644
17 @@ -574,6 +574,12 @@ int recv_files(int f_in, int f_out, char *local_name)
18 file = dir_flist->files[cur_flist->parent_ndx];
19 fname = local_name ? local_name : f_name(file, fbuf);
21 + if (daemon_filter_list.head
22 + && check_filter(&daemon_filter_list, FLOG, fname, 0) < 0) {
23 + rprintf(FERROR, "attempt to hack rsync failed.\n");
24 + exit_cleanup(RERR_PROTOCOL);
27 if (DEBUG_GTE(RECV, 1))
28 rprintf(FINFO, "recv_files(%s)\n", fname);
30 @@ -645,12 +651,6 @@ int recv_files(int f_in, int f_out, char *local_name)
32 cleanup_got_literal = 0;
34 - if (daemon_filter_list.head
35 - && check_filter(&daemon_filter_list, FLOG, fname, 0) < 0) {
36 - rprintf(FERROR, "attempt to hack rsync failed.\n");
37 - exit_cleanup(RERR_PROTOCOL);