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

Fix parseInfoFile does not handle spaces in filenames #3159

Merged
merged 2 commits into from
Apr 2, 2019

Commits on Apr 2, 2019

  1. fix parseInfoFile does not handle spaces in filenames

    `/proc/self/mountinfo` uses `\040` for spaces, however, `parseInfoFile()`
    did not decode those spaces in paths, therefore attempting to use `\040`
    as a literal part of the path.
    
    This patch un-quotes the `root` and `mount point` fields to fix
    situations where paths contain spaces.
    
    Note that the `mount source` field is not modified, given that
    this field is documented (man `PROC(5)`) as:
    
        filesystem-specific information or "none"
    
    Which I interpreted as "the format in this field is undefined".
    
    Reported-by: Daniil Yaroslavtsev <daniilyar@users.noreply.github.com>
    Reported-by: Nathan Ringo <remexre@gmail.com>
    Based-on-patch-by: Diego Becciolini <itizir@users.noreply.github.com>
    Based-on-patch-by: Sergei Utinski <sergei-utinski@users.noreply.github.com>
    Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    thaJeztah committed Apr 2, 2019
    Configuration menu
    Copy the full SHA
    c22effb View commit details
    Browse the repository at this point in the history
  2. Use pkg/errors for all errors

    Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    thaJeztah committed Apr 2, 2019
    Configuration menu
    Copy the full SHA
    adc4fa2 View commit details
    Browse the repository at this point in the history