Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/flux: ensure selfdir always at front of PATH, and fix issue when builddir is inaccessible #1683

Merged
merged 3 commits into from Sep 27, 2018

Commits on Sep 27, 2018

  1. libutil: environment_push should always move items to front

    Problem: The flux(1) command driver doesn't move the path to itself
    to the front of PATH when its path already exists in PATH. This
    could cause a `flux` binary from a different installation of
    flux to be run inadvertently, e.g.:
    
     $ PATH='/usr/src/src/cmd:/bin:/usr/bin' /usr/bin/flux /bin/sh -c 'which flux'
     /usr/src/src/cmd/flux
    
    Fix this by having `environment_push()` *always* push an entry to the
    front, even when that entry already exists in the environment "item".
    
    Fixes flux-framework#1679
    grondo committed Sep 27, 2018
    Copy the full SHA
    b045094 View commit details
    Browse the repository at this point in the history
  2. t1102-cmddriver.t: check that flux moves selfdir to front of PATH

    Add a test to ensure that the flux(1) cmddriver moves its own
    "selfdir" to the front of PATH, even when selfdir already exists in
    PATH (but not at the front).
    grondo committed Sep 27, 2018
    Copy the full SHA
    f80858f View commit details
    Browse the repository at this point in the history
  3. cmd/flux: do not die on EACCES to build dir

    Problem: if the original build directory for flux-core is still
    around and inaccessible to the flux(1) command due to permissions,
    the flux executable dies with
    
     flux realpath (private/path) Permission denied
    
    while attempting to determine if it is run out of a builddir or the
    installed path.
    
    Fix this by checking for either ENOENT or EACCES from realpath(3),
    and falling through to the installed path check if either error
    is encountered.
    
    Fixes flux-framework#1674
    grondo committed Sep 27, 2018
    Copy the full SHA
    25e85ca View commit details
    Browse the repository at this point in the history