Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 488692 - mount-boot.eclass doesn't work with SELinux
Summary: mount-boot.eclass doesn't work with SELinux
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: SELinux (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: SE Linux Bugs
URL:
Whiteboard: sec-policy r1
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-20 09:07 UTC by Mira Ressel
Modified: 2014-04-19 19:08 UTC (History)
0 users

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 Mira Ressel 2013-10-20 09:07:54 UTC
The SELinux policy prevents portage_t, and therefore mount-boot.eclass (used in the grub ebuild) from mounting /boot. So we either have to grant portage_t that permission, or to (imho better) disable that automatism.

To do the latter, it's only neccessary to add the line "DONT_MOUNT_BOOT=1" to profiles/features/selinux/make.defaults in the portage tree.
Comment 1 Sven Vermeulen (RETIRED) gentoo-dev 2013-10-27 17:45:27 UTC
Or add in a SELinux boolean (portage_mount_boot?) to toggle this as well.
Comment 2 Mira Ressel 2013-10-31 15:31:37 UTC
A boolean toggling portage access to /boot between "dontaudit" and "allow" wouldn't suffice, as the grub ebuild die()s if it can't mount /boot.
Comment 3 Sven Vermeulen (RETIRED) gentoo-dev 2013-11-01 15:36:25 UTC
Yes, but I was thinking of letting the user decide on its options without "forcing" things through our profile.

1) The user mounts /boot himself and retries. As /boot is already mounted, things continue to work.
2) User doesn't want the ebuild to mount /boot, so he sets DONT_MOUNT_BOOT himself.
3) User wants Portage to mount /boot, so toggles the SELinux boolean allowing Portage to mount /boot

Just need to find the proper permissions ;)
Comment 4 Sven Vermeulen (RETIRED) gentoo-dev 2013-12-16 14:46:00 UTC
portage_mount_fs boolean is in repo.

This way, users can choose - either disable portage trying to mount /boot, or allow it through the boolean as well.
Comment 5 Sven Vermeulen (RETIRED) gentoo-dev 2014-03-24 19:38:34 UTC
It's in 20140311-r1
Comment 6 Sven Vermeulen (RETIRED) gentoo-dev 2014-04-19 19:08:34 UTC
Stable