From a58aee00cbdfeb89fe325434aa8652bfc3654dec 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 8663268ef..74c96f51b 100644 --- a/src/filemanager/file.c +++ b/src/filemanager/file.c @@ -1867,7 +1867,7 @@ copy_file_file (FileOpTotalContext * tctx, FileOpContext * ctx, break; } } - else + else if (!dst_exists) { src_mode = umask (-1); umask (src_mode);