This repository has been archived by the owner. It is now read-only.
Commits on Feb 20, 2018
-
*: Switch from mkdirp to correctMkdir to preserve perms and owners
Switch to correctMkdir as much as possible to ensure that permissions on directories are correct.
Commits on Jun 30, 2016
-
cache: ignore enoent on chownr while adding packages to cache
Fixes: #12669 PR-URL: #13023 Credit: @julianduque Reviewed-By: @othiym23
-
Commits on Jan 21, 2016
-
install: fix race condition correcting cache directory ownership
Previously, correctMkdir() would cache the results early within its operation (after the stat, before calling chownr) meaning that any second call would immediately return the cached results, before the earlier chownr finishes. This causes a race condition where the initial chownr would fail with ENOENT (or similar errors) trying to scan files that were being actively created/deleted/etc by the install process. The fix guards the whole correctMkdir function with inflight() so that multiple calls do not do chownr simultaneously nor return early. It would also be reasonable to not cache the results until after the chownr has finished, however that would still lead to an even more subtle race condition, so the guard on the whole call is required. PR-URL: #11142 Credit: @Jimbly Reviewed-By: @othiym23
Commits on Jun 26, 2015
Commits on Jun 18, 2015
-
utils: use a safer mkdirp with chownr
Makes paths more consistently. Fixes #8595.