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 <slavazanko@gmail.com>
This commit is contained in:
Slava Zanko 2012-03-22 18:56:03 +03:00 committed by Ilia Maslakov
parent 68e1b4f9c6
commit a58aee00cb

View File

@ -1867,7 +1867,7 @@ copy_file_file (FileOpTotalContext * tctx, FileOpContext * ctx,
break;
}
}
else
else if (!dst_exists)
{
src_mode = umask (-1);
umask (src_mode);