Description of problem: Mounting a (non-clustered) GFS2 file system from fstab breaks with selinux-targeted policy. The following error messages show up in syslog during system startup: Mar 4 14:23:34 F8 kernel: GFS2 (built Feb 10 2008 17:05:30) installed Mar 4 14:23:34 F8 kernel: GFS2: fsid=: Trying to join cluster "lock_nolock", "dm-1" Mar 4 14:23:34 F8 kernel: audit(1204633414.315:6): avc: denied { sys_module } for pid=1545 comm="mount.gfs2" capability=16 scontext=system_u:system_r:mount_t:s0 tcontext=system_u:system_r:mount_t:s0 tclass=capability Mar 4 14:23:34 F8 kernel: GFS2: can't find protocol lock_nolock Mar 4 14:23:34 F8 kernel: GFS2: fsid=: can't mount proto=lock_nolock, table=dm-1, hostdata= Mar 4 14:23:34 F8 kernel: GFS2: fsid=: Trying to join cluster "lock_nolock", "dm-1" Mar 4 14:23:34 F8 kernel: audit(1204633414.600:7): avc: denied { sys_module } for pid=1587 comm="mount.gfs2" capability=16 scontext=system_u:system_r:mount_t:s0 tcontext=system_u:system_r:mount_t:s0 tclass=capability Mar 4 14:23:34 F8 kernel: GFS2: can't find protocol lock_nolock Mar 4 14:23:34 F8 kernel: GFS2: fsid=: can't mount proto=lock_nolock, table=dm-1, hostdata= Version-Release number of selected component (if applicable): selinux-policy-3.0.8-87.fc8 How reproducible: Every time Steps to Reproduce: 1. mkfs -t gfs2 /dev/VolGroup00/LogVol01 2. mkdir /tmp/gfs2 3. echo "/dev/VolGroup00/LogVol01 /tmp/gfs2 gfs2 defaults 0 0" >> /etc/fstab 4. reboot and watch it fail
Mount is allowed to exec modutils, any reason this command is now execing it? Which module is it loading? Wouldn't it be better if this happened somewhere else besides the mount command? Allowing the mount command to modify sections of the kernel feels wrong.
In my case I believe it tried to load the lock_nolock kernel module, i.e. the locking protocol...
Yes, it ought to happen automatically. I'll have a look and see if we are not doing that for some reason.
Ah, now I remember what the problem is here. The userland parts of mount.gfs2 need to talk to the lock module before we actually call into the kernel (via the mount syscall) and thus we have to poke the module to load earlier. I guess this is really only a problem for lock_dlm but there is no harm in doing both I suppose. The long term plan is to merge the two lock modules into the main part of GFS2 and the locking interface will become the DLM's interface. That should solve the problem at that stage.
*** Bug 448600 has been marked as a duplicate of this bug. ***
This is now fixed upstream for lock_nolock. That lock module no longer exists so we don't need to load it (obviously lock_nolock protocol is still supported, its just built in now). Eventually the plan is to do the same thing to lock_dlm as well.
This message is a reminder that Fedora 8 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 8. 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 WONTFIX if it remains open with a Fedora 'version' of '8'. 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 prior to Fedora 8's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 8 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 please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. 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. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
The issue is now solved by removal of the locking modules in the upstream kernel, so there is no need to load them from the init script. In 2.6.30