Bug 1054559 - selinux policy reset workflow
Summary: selinux policy reset workflow
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: 20
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-17 03:03 UTC by Deleted Account
Modified: 2015-06-30 00:51 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-06-30 00:51:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
fenrus02 #fedora-selinux reset (custom) policy = recover script (1.16 KB, application/x-shellscript)
2014-01-17 03:03 UTC, Deleted Account
no flags Details

Description Deleted Account 2014-01-17 03:03:31 UTC
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.

Comment 1 Daniel Walsh 2014-02-14 18:29:18 UTC
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.

Comment 2 Miroslav Grepl 2014-02-18 14:10:30 UTC
Yes, keep only policy pkgs in the game.

Comment 3 Daniel Walsh 2014-02-18 15:01:47 UTC
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

Comment 4 Deleted Account 2014-02-24 18:37:34 UTC
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?)

Comment 5 Deleted Account 2014-04-29 16:39:37 UTC
Upstream Status Check

Comment 6 Deleted Account 2014-06-20 17:36:31 UTC
 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, :-).

Comment 7 Deleted Account 2014-07-09 15:13:45 UTC
 Note, i'm waiting on an official procedure, packaged script. As other people might be without reporting.

Comment 8 Fedora End Of Life 2015-05-29 10:32:39 UTC
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.

Comment 9 Fedora End Of Life 2015-06-30 00:51:34 UTC
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.


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