fix: add SELinux support for volume mounts#8359
Conversation
|
Bugbot is not enabled for this team, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Is the program "getenforce" available everywhere? What happens when it is not? The mega-linter-runner doesn't necessarily run only on fedora or centos |
|
Bugbot is not enabled for this team, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Fair point, I added try-catch block for that case. so now this function will evaluate to false on non-SE systems (including windows & mac). |
|
I would prefer to have a new cli option --se-linux to avoid to try a call getenforce for each call (to not degrade performances on windows / mac / other linux) |
|
There doesn't seem to be any such env variable. I could find the following approaches: Calling `sestatus` command
sestatusOutput: Reading `/etc/selinux/config`
cat /etc/selinux/configOutput: Calling `getenforce` command
Output: One thing which could be done is to let the user set In addition to CLI flag, I also suggest the ability to specify it in megalinter config file: |
|
I refactored the logic to read |
nvuillam
left a comment
There was a problem hiding this comment.
Works for me, thanks ! :) (i'll merge once we'll have fixed the CI issues)
Fixes mega-linter-runner on SELinux systems like Fedora.
#8214 (comment)
Proposed Changes
zmount optionReadiness Checklist
Author/Contributor
Reviewing Maintainer
breakingif this is a large fundamental changeautomation,bug,documentation,enhancement,infrastructure, orperformance