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

feature: Support atomfs molecule mount in containers #359

Merged
merged 2 commits into from
Jan 5, 2023

Commits on Dec 19, 2022

  1. feat: use custom lockfile if we can't create one under /tmp

    Signed-off-by: Serge Hallyn <serge@hallyn.com>
    hallyn committed Dec 19, 2022
    Configuration menu
    Copy the full SHA
    37021f0 View commit details
    Browse the repository at this point in the history

Commits on Dec 21, 2022

  1. feat: atomfs mount: use squashfuse for non-root users

    While stacker knows how to use squashfuse for 'stacker grab', that
    function simply keeps the squashfuse process running for the duration
    of the grab, then lets it close.  For atomfs molecule.Mount, we must
    release that process.
    
    So when doing atomfs.Mount(),
    
    first check whether we are definitely NOT root using amHostRoot().
    There is a corner case which can slip past this - namely if you,
    as root, create a userns wherein you map the full host uid range.
    However, you'll never have real root being told it wasn't real
    root.
    
    Second, if neither of those are the case, then try the regular
    mount syscall, requiring root.  If that succeeds, or fails with
    a non-permission error, then return.
    
    If we are detected as not-real-root, or if mount failed as real root
    with a permission error, and no verity root has was provided, then use
    squashfuse, and release the exec'd process so that it can outlive us.
    
    The actual squashfuse mount function is shared with the
    extract path.
    
    Signed-off-by: Serge Hallyn <serge@hallyn.com>
    hallyn committed Dec 21, 2022
    Configuration menu
    Copy the full SHA
    6a64317 View commit details
    Browse the repository at this point in the history