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

Conversation

mihalicyn
Copy link
Member

@mihalicyn mihalicyn commented Jun 6, 2024

It's just an updated version of #621

Unfortunately, I wasn't able to update the original branch for some reason GitHub just automatically closed a PR after I force-pushed my edits into the original PR branch.

sdab added 2 commits June 6, 2024 11:35
… 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]>
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]>
@mihalicyn
Copy link
Member Author

cc @sdab

@stgraber stgraber merged commit 62c7230 into lxc:main Jun 6, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants