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

Improvements for FHS user chrootenv #16030

Merged
merged 5 commits into from
Jun 11, 2016
Merged

Commits on Jun 7, 2016

  1. buildFHSEnv: refactor and simplify, drop buildFHSChrootEnv

    This takes another approach at binding FHS directory structure. We
    now bind-mount all the root filesystem to directory "/host" in the target tree.
    From that we symlink all the directories into the tree if they do not already
    exist in FHS structure.
    
    This probably makes `CHROOTENV_EXTRA_BINDS` unnecessary -- its main usecase was
    to add bound directories from the host to the sandbox, and we not just symlink
    all of them. I plan to get some feedback on its usage and maybe deprecate it.
    
    This also drops old `buildFHSChrootEnv` infrastructure. The main problem with it
    is it's very difficult to unmount a recursive-bound directory when mount is not
    sandboxed. This problem is a bug even without these changes -- if
    you have for example `/home/alice` mounted to somewhere, you wouldn't see
    it in `buildFHSChrootEnv` now. With the new directory structure, it's
    impossible to use regular bind at all. After some tackling with this I realized
    that the fix would be brittle and dangerous (if you don't unmount everything
    clearly and proceed to removing the temporary directory, bye-bye fs!). It also
    probably doesn't worth it because I haven't heard that someone actually uses it
    for a long time, and `buildFHSUserEnv` should cover most cases while being much
    more maintainable and safe for the end-user.
    abbradar committed Jun 7, 2016
    Configuration menu
    Copy the full SHA
    74107a7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8d9e5d2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3e90b00 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3d8664e View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2016

  1. Configuration menu
    Copy the full SHA
    75ea052 View commit details
    Browse the repository at this point in the history