Created attachment 851380 [details] fenrus02 #fedora-selinux reset (custom) policy = recover script Over the curse of the years i have needed to open/grant some permissions to problematic packages, since that time the projects could have fixed that issues and so i'd like to reset to the default plain vanilla policies to prevent security holes. In #fedora-selinux <fenrus02> informed that there seems not to be a method for that yet out of the box, but being further constructive he coded what i/we propose as a sereset-policy-targeted & serecover-policy-targeted (targeted cause of implementation, free to expansions): attached Originally goal is recovery of borked selinux setups, we talked about it and seems removing: line 30 | /usr/sbin/semanage -i ${TMPDIR}/SELINUX-CUSTOM-CONFIG_${DS}.txt converts to my too original goal, reset plain vanilla setup (and keep backup). I think the problem and the solution makes this interesting for the selinux community.
Not bad, I see no reason to install anything other then selinux-policy* packages Also you would only need to restorecon -R -v /etc/selinux Not the entire system. It should also check if the machine was in enforcing mode before putting it in enforcing mode at the end. Optionally you might want to reboot at the end also.
Yes, keep only policy pkgs in the game.
We really need to get to the point where we install selinux-policy into /usr/lib/selinux/ Then /etc/selinux/ Becomes a place of customization. So restoring a system to the default becomes. rm -rf /etc/selinux
On Comment #1 Only yum reinstall selinux-policy{,-targeted} Only restorecon -.R -v /etc/selinux Got It, Thanks Daniel On Comment #3 I'm glad this bug report is making its purpose think of and figure a restore setup. Is there going to be a migration step to that? (This Script?)
Upstream Status Check
Any status/progress in an approved selinux-revert-policy or whatever you'd be working on related to this? Sanitize the system is an interesting/important part of selinux, unneeded open permissions should be discouraged, :-).
Note, i'm waiting on an official procedure, packaged script. As other people might be without reporting.
This message is a reminder that Fedora 20 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 20. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '20'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 20 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.