Lines 1-44
Link Here
|
1 |
From: Jeriko One <jeriko.one@gmx.us> |
|
|
2 |
Date: Thu, 2 Nov 2017 23:44:19 -0700 |
3 |
Subject: Check fname in recv_files sooner. |
4 |
Origin: https://git.samba.org/?p=rsync.git;a=commit;h=3e06d40029cfdce9d0f73d87cfd4edaf54be9c51 |
5 |
Bug-Debian: https://bugs.debian.org/883667 |
6 |
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2017-17433 |
7 |
|
8 |
--- |
9 |
receiver.c | 12 ++++++------ |
10 |
1 file changed, 6 insertions(+), 6 deletions(-) |
11 |
|
12 |
diff --git a/receiver.c b/receiver.c |
13 |
index baae3a91..9fdafa15 100644 |
14 |
--- a/receiver.c |
15 |
+++ b/receiver.c |
16 |
@@ -574,6 +574,12 @@ int recv_files(int f_in, int f_out, char *local_name) |
17 |
file = dir_flist->files[cur_flist->parent_ndx]; |
18 |
fname = local_name ? local_name : f_name(file, fbuf); |
19 |
|
20 |
+ if (daemon_filter_list.head |
21 |
+ && check_filter(&daemon_filter_list, FLOG, fname, 0) < 0) { |
22 |
+ rprintf(FERROR, "attempt to hack rsync failed.\n"); |
23 |
+ exit_cleanup(RERR_PROTOCOL); |
24 |
+ } |
25 |
+ |
26 |
if (DEBUG_GTE(RECV, 1)) |
27 |
rprintf(FINFO, "recv_files(%s)\n", fname); |
28 |
|
29 |
@@ -645,12 +651,6 @@ int recv_files(int f_in, int f_out, char *local_name) |
30 |
|
31 |
cleanup_got_literal = 0; |
32 |
|
33 |
- if (daemon_filter_list.head |
34 |
- && check_filter(&daemon_filter_list, FLOG, fname, 0) < 0) { |
35 |
- rprintf(FERROR, "attempt to hack rsync failed.\n"); |
36 |
- exit_cleanup(RERR_PROTOCOL); |
37 |
- } |
38 |
- |
39 |
if (read_batch) { |
40 |
int wanted = redoing |
41 |
? we_want_redo(ndx) |
42 |
-- |
43 |
2.15.1 |
44 |
|