Fedora Account System
Red Hat Associate
Red Hat Customer
From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040312 Description of problem: I compile the kernel as root (root:sysadm_r:sysadm_t policy). The last step of the kernel compilation is to run depmod like so: /sbin/depmod -ae -F System.map 2.6.4-1.305custom This produces the following error: FATAL: Could not open 'System.map': Permission denied The following message appears in /var/log/messages: Apr 5 20:05:14 asok kernel: audit(1081188314.313:0): avc: denied { search } for pid=31859 exe=/sbin/depmod name=linux-2.6.4-1.305 dev=hda5 ino=33 scontext=root:sysadm_r:depmod_t tcontext=system_u:object_r:src_t tclass=dir With setenforce 0, everything works fine. Version-Release number of selected component (if applicable): kernel-source-2.6.4-1.305 How reproducible: Always Steps to Reproduce: 1. Configure and compile custom kernel 2. make modules_install Actual Results: depmod fails Expected Results: depmod should work Additional info:
Could you see if adding this r_dir_file(depmod_t, src_t) to /etc/security/selinux/src/policy/domains/program/modutile.te and then do a make load fixes the problem.
Yep, adding the line above to modutil.te included with policy-sources-1.9.2-9 at line 46 fixes the problem. Without the line, I would get the following error in /var/log/messages: Apr 6 02:48:48 asok kernel: audit(1081212528.277:0): avc: denied { search } for pid=3040 exe=/sbin/depmod name=linux-2.6.4-1.305 dev=hda5 ino=33 scontext=root:sysadm_r:depmod_t tcontext=system_u:object_r:src_t tclass=dir
Fixed in policy-1.9.2-12
Yep, works for me.