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

Only fail if selinux is in enforcing #6881

Merged
merged 1 commit into from
Aug 8, 2022
Merged

Only fail if selinux is in enforcing #6881

merged 1 commit into from
Aug 8, 2022

Conversation

thomasjcf21
Copy link

In #6639 (which was implemented because of issue #2374) a bug was introduced where the installer will fail even if SELinux is set to permissive. The check is explicitly checking if SELinux is disabled but this is not accurate. SELinux can have three states:

  • Disabled
  • Permissive
  • Enforcing

Disable means SELinux is not running at all.
Permissive means that SELinux is running, but it won't prevent any actions, even if they would be denied.
Enforcing means that SELinux is running and will deny any actions which don't match a rule.

In our environment we are required to have SELinux set to permissive, therefore, we are unable to install nix. Even though beforehand we were able too. I've worked around this by manually downloading the install bundle and then changing the check, but I thought I would also update the repo to prevent other people having this problem.

It's not right to mandate that SELinux should be disabled because this prevents the file system from getting the right file contexts applied. Which means if a SysAdmin wants to ever go back to enforcing this becomes a lot harder. Whereas, with SELinux set to permissive the file system still keeps it's contexts etc.

The real solution would be to provide SELinux rules for the application, but I understand at this current time that is not feasible.

I have checked on my fedora system and the install will now continue if SELinux is set to Disabled or Permissive, but will show the same error as in #6639 if the system is set to enforcing.

Many Thanks,
Tom Franklin.

@edolstra edolstra enabled auto-merge August 8, 2022 11:21
@edolstra edolstra merged commit 3a09a32 into NixOS:master Aug 8, 2022
Minion3665 pushed a commit to Minion3665/nix that referenced this pull request Feb 23, 2023
…properly

Only fail if selinux is in enforcing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants