Bug 1290008 - [RFE] Implement a confirmation prompt and warning text for setenforce 0
Summary: [RFE] Implement a confirmation prompt and warning text for setenforce 0
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: libselinux
Version: rawhide
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Petr Lautrbach
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-09 13:40 UTC by Daniel Kopeček
Modified: 2020-06-23 19:00 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-06-23 19:00:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Daniel Kopeček 2015-12-09 13:40:48 UTC
Description of problem:
Using `setenforce 0` became a common way to "fix" errors (Permission denied) caused by mislabeled files, bugs or missing rules in the policy, etc. Disabling SELinux policy enforcement as the only action to fix these issues is arguably not the best thing to do. 

I would like to suggest adding a confirmation prompt and a warning/advice text to the setenforce command -- only when executed with the intention to disable policy enforcement. 


Actual results:
No question and no warning message about the consequences of running setenforce 0.


Expected results:
A prompt asking for confirmation of the action (with a default "no" answer) and a warning message explaining what are the consequences of disabling policy enforcement (thus educating users who found this "solution" somewhere on the internet). Optionally, show a bit of advice how to debug the most common issues -- possibly with a redirection to a man page that explains the most common workflows to fix policy issues, mislabeling or creating better temporary workaround fixes that don't disable policy enforcement on the whole system).


Additional info:


Note You need to log in before you can comment on or make changes to this bug.