mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-05 11:04:42 +03:00
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:
parent
68e1b4f9c6
commit
a58aee00cb
@ -1867,7 +1867,7 @@ copy_file_file (FileOpTotalContext * tctx, FileOpContext * ctx,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (!dst_exists)
|
||||||
{
|
{
|
||||||
src_mode = umask (-1);
|
src_mode = umask (-1);
|
||||||
umask (src_mode);
|
umask (src_mode);
|
||||||
|
Loading…
Reference in New Issue
Block a user