From 82dcbe219498c7fa7d3879829e7a7631c82276f7 Mon Sep 17 00:00:00 2001 From: Slava Zanko Date: Thu, 22 Mar 2012 18:56:03 +0300 Subject: [PATCH] Ticket #2278: Problem in the Copy operation Previously, copying a file does not change access permissions of the destination file if the check box "Preserve attributes" in the Copy window is not set. For some time it is not so: if you uncheck the "Preserve attributes" then access permissions of the destination file are set in accordance with the value of umask, which can lead to information disclosure(i.e. security problem). Signed-off-by: Slava Zanko --- src/filemanager/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filemanager/file.c b/src/filemanager/file.c index ea7e5a4f2..4b4d73884 100644 --- a/src/filemanager/file.c +++ b/src/filemanager/file.c @@ -1772,7 +1772,7 @@ copy_file_file (FileOpTotalContext * tctx, FileOpContext * ctx, break; } } - else + else if (!dst_exists) { src_mode = umask (-1); umask (src_mode); -- 2.11.4.GIT