Skip to content
This repository has been archived by the owner. It is now read-only.

Commits on Feb 20, 2018

  1. *: 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.
    iarna committed Feb 20, 2018

Commits on Jun 30, 2016

  1. cache: ignore enoent on chownr while adding packages to cache

    Fixes: #12669
    PR-URL: #13023
    Credit: @julianduque
    Reviewed-By: @othiym23
    julianduque authored and zkat committed Jun 30, 2016
  2. utils: Fix a Windows corner case with correct-mkdir

    If a user were to have SUDO_UID and SUDO_GID, they'd be able
    to get into a pretty weird state. This fixes that corner case.
    
    PR-URL: #13023
    Credit: @zkat
    Reviewed-By: @othiym23
    zkat committed Jun 30, 2016

Commits on Jan 21, 2016

  1. 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
    Jimbly authored and iarna committed Jan 21, 2016

Commits on Jun 26, 2015

Commits on Jun 18, 2015

  1. utils: use a safer mkdirp with chownr

    Makes paths more consistently. Fixes #8595.
    othiym23 committed Jun 18, 2015