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

Allow overriding RUNTIME_DIR with a cli flag #2 #645

Merged
merged 2 commits into from
Jun 6, 2024

Commits on Jun 6, 2024

  1. lxcfs/bindings: Refactor RUNTIME_PATH so that it can be overridden on…

    … startup
    
    What was RUNTIME_PATH is now named DEFAULT_RUNTIME_PATH so this should not change current behavior.
    It is done in preparation for adding a flag to override the runtime path on startup.
    
    Signed-off-by: Sebastien Dabdoub <[email protected]>
    - permission mask change 0755 -> 0700
    - commit message edits
    - use tabs everywhere instead of spaces
    Signed-off-by: Alexander Mikhalitsyn <[email protected]>
    sdab authored and mihalicyn committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    328a30b View commit details
    Browse the repository at this point in the history
  2. lxcfs/bindings: add a flag for overriding the runtime dir

    Adds a --runtime-dir cli flag which overrides the /run dir in the lxcfslib.
    This ended up being kind of tricky because of how lxcfslib can be reloaded and
    its use of a library constructor.
    
    In order read the cli flag and then set a variable in the library, I removed
    the contstructor and made init happen as part of the fuse load/reload.
    
    I also added the runtime field to the lxcfs_opts struct and upped its version
    for backwards compatibility.
    
    Signed-off-by: Sebastien Dabdoub <[email protected]>
    - permission mask change 0755 -> 0700
    - prevent potential NULL-pointer dereference in lxcfs_fuse_init()
    - commit message edits
    - one commit was squashed
    Signed-off-by: Alexander Mikhalitsyn <[email protected]>
    sdab authored and mihalicyn committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    5c42da9 View commit details
    Browse the repository at this point in the history