mirror of
https://github.com/troglobit/libite.git
synced 2026-10-27 12:11:06 +00:00
Fix mkpath() ignoring mode when umask is more restrictive
mkpath(dir, 0755) with umask 0027 silently creates a 0750 directory, since mkdir(2) applies the umask to the requested mode. Callers pass an explicit mode and expect exactly that. Apply the mode with chmod() after each successful mkdir(). Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
3 files changed
+49
-3
No files matched your search
@@ -4,6 +4,14 @@ Change Log
|
||||
All notable changes to the project are documented in this file.
|
||||
|
||||
|
||||
[UNRELEASED][]
|
||||
--------------
|
||||
|
||||
### Fixes
|
||||
- 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
|
||||
|
||||
[v2.6.2][] - 2025-11-22
|
||||
-----------------------
|
||||
|
||||
|
||||
Reference in new issue
Block a user