mirror of
https://github.com/troglobit/libite.git
synced 2026-10-15 10:29:31 +00:00
Fix copyfile() not preserving source mode with restrictive umask
copyfile() passes the source mode to open(2), which applies the umask, so a 0644 file copied with umask 0027 ends up 0640. Apply the source mode with fchmod() after creating the destination. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
3 files changed
+34
-1
No files matched your search
@@ -8,6 +8,8 @@ All notable changes to the project are documented in this file.
|
||||
--------------
|
||||
|
||||
### Fixes
|
||||
- Fix `copyfile()` not preserving the source file mode when the process
|
||||
umask is more restrictive
|
||||
- Fix `mkpath()`, and `fmkpath()`, not applying the given mode when the
|
||||
process umask is more restrictive, e.g., requesting 0755 with umask
|
||||
0027 silently created a 0750 directory
|
||||
|
||||
Reference in new issue
Block a user