Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 486610 - A switch in SELinux policy should require update on /etc/selinux/sepolgen.conf (eventually)
Summary: A switch in SELinux policy should require update on /etc/selinux/sepolgen.con...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: SELinux (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: SE Linux Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-30 20:09 UTC by Sven Vermeulen (RETIRED)
Modified: 2017-05-28 12:41 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Vermeulen (RETIRED) gentoo-dev 2013-09-30 20:09:35 UTC
20:03 <@SwifT> feandil: not really, if the strict & mls policy deployments are 
               both handled by gentoo still (so they are both in 
               POLICY_TYPES) then the directory for strict and for mls will
               be the same, so the change in sepolgen.conf is not needed
20:05 <@SwifT> feandil: but if you switch from strict to mls, update 
               POLICY_TYPES and pull in more policy changes (ebuilds), then as 
               long as sepolgen.conf isn't updated, it might eventually give
               issues
20:05 <@SwifT> feandil: so I might need to update the file upon selinux-base 
               builds
20:05 <@SwifT> haven't put that in yet
20:05 <@SwifT> i'll bug myself for it - at least an ewarn would be nice

In other words, try to detect if a policy name change has occurred (parse sepolgen.conf?) and if so, warn the user that sepolgen.conf needs to be updated.

Reproducible: Always
Comment 1 Sven Vermeulen (RETIRED) gentoo-dev 2013-12-29 15:20:11 UTC
I'm probably going to add in a pkg_setup() that generates the SELINUX_DEVEL_PATH entry (similar as how dev-python/sepolgen does it) and check if the line in /etc/selinux/sepolgen.conf is correct, and warn the user if that is not the case.
Comment 2 Sven Vermeulen (RETIRED) gentoo-dev 2014-03-25 15:07:26 UTC
Hmm, perhaps it would work to set a symbolic link (/usr/share/selinux/current or devel) to the currect location. That would make it a lot simpler. I'll check that out later.
Comment 3 D'juan McDonald (domhnall) 2016-12-29 20:35:53 UTC
xapi ~ # sepolgen
  File "/usr/lib/python-exec/python3.4/sepolicy", line 265
    print "\n" + bold_start + "%s: %s %s" % (src, protocol, perm) + bold_end
             ^
SyntaxError: invalid syntax (still?)