Bug 1290008 - [RFE] Implement a confirmation prompt and warning text for setenforce 0
[RFE] Implement a confirmation prompt and warning text for setenforce 0
Status: NEW
Product: Fedora
Classification: Fedora
Component: libselinux (Show other bugs)
All Linux
unspecified Severity high
: ---
: ---
Assigned To: Petr Lautrbach
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2015-12-09 08:40 EST by Daniel Kopeček
Modified: 2016-06-10 09:28 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Daniel Kopeček 2015-12-09 08:40:48 EST
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.