abrt version: 2.0.5 executable: /usr/bin/python hashmarkername: setroubleshoot kernel: 3.0.0-3.1.fc16.x86_64 reason: SELinux is preventing /usr/bin/python from 'setattr' accesses on the directory /var/lib/mock/fedora-15-x86_64/root/usr/libexec/gcc. time: Wed Aug 3 10:37:16 2011 description: :SELinux is preventing /usr/bin/python from 'setattr' accesses on the directory /var/lib/mock/fedora-15-x86_64/root/usr/libexec/gcc. : :***** Plugin catchall (100. confidence) suggests *************************** : :If you believe that python should be allowed setattr access on the gcc directory by default. :Then you should report this as a bug. :You can generate a local policy module to allow this access. :Do :allow this access for now by executing: :# grep yum /var/log/audit/audit.log | audit2allow -M mypol :# semodule -i mypol.pp : :Additional Information: :Source Context unconfined_u:system_r:mock_t:s0 :Target Context system_u:object_r:bin_t:s0 :Target Objects /var/lib/mock/fedora-15-x86_64/root/usr/libexec/gc : c [ dir ] :Source yum :Source Path /usr/bin/python :Port <Unknown> :Host (removed) :Source RPM Packages python-2.7.2-4.fc16 :Target RPM Packages :Policy RPM selinux-policy-3.10.0-13.fc16 :Selinux Enabled True :Policy Type targeted :Enforcing Mode Permissive :Host Name (removed) :Platform Linux (removed) 3.0.0-3.1.fc16.x86_64 #1 : SMP Tue Aug 2 12:32:36 PDT 2011 x86_64 x86_64 :Alert Count 1 :First Seen Wed 03 Aug 2011 10:36:10 AM PDT :Last Seen Wed 03 Aug 2011 10:36:10 AM PDT :Local ID 589cacaf-d62d-4029-b4f1-55d46155423e : :Raw Audit Messages :type=AVC msg=audit(1312392970.417:472): avc: denied { setattr } for pid=2536 comm="yum" name="gcc" dev=dm-1 ino=532763 scontext=unconfined_u:system_r:mock_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=dir : : :type=SYSCALL msg=audit(1312392970.417:472): arch=x86_64 syscall=chown success=yes exit=0 a0=1c5fc90 a1=0 a2=0 a3=1b items=0 ppid=2454 pid=2536 auid=501 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=2 comm=yum exe=/usr/bin/python subj=unconfined_u:system_r:mock_t:s0 key=(null) : :Hash: yum,mock_t,bin_t,dir,setattr : :audit2allow : :#============= mock_t ============== :allow mock_t bin_t:dir setattr; : :audit2allow -R : :#============= mock_t ============== :allow mock_t bin_t:dir setattr; :
This is just an example alert: I have 102, all related to the same thing - selinux is interfering with mock again. If I try to do a mock rebuild with selinux set to enforcing I get: [adamw@adam bitlbee (f16 %)]$ mock -r fedora-15-x86_64 --rebuild /home/adamw/build/bitlbee/bitlbee-3.0.3-4.fc16.src.rpm INFO: mock.py version 1.1.12 starting... State Changed: init plugins INFO: selinux disabled State Changed: start ERROR: Cannot find/open srpm: /home/adamw/build/bitlbee/bitlbee-3.0.3-4.fc16.src.rpm. Error: Unable to open file if I set it to permissive I can do the rebuild, and I get a ton of avcs, including this one.
If you chcon -Rt mock_var_lib_t /var/lib/mock Does the problem go away? Miroslav I think we should just label it. /var/lib/mock(/.*)? gen_context(system_u:object_r:mock_var_lib_t,s0)
Nope. [root@adam bitlbee (f16 %)]# chcon -Rt mock_var_lib_t /var/lib/mock/ [root@adam bitlbee (f16 %)]# setenforce Enforcing [root@adam bitlbee (f16 %)]# exit [adamw@adam bitlbee (f16 %)]$ mock -r fedora-15-x86_64 --rebuild /home/adamw/build/bitlbee/bitlbee-3.0.3-4.fc16.src.rpm INFO: mock.py version 1.1.12 starting... State Changed: init plugins INFO: selinux disabled State Changed: start ERROR: Cannot find/open srpm: /home/adamw/build/bitlbee/bitlbee-3.0.3-4.fc16.src.rpm. Error: Unable to open file
Well that is a different bug. For now can you execute. chcon -t mock_var_lib_t /home/adamw/build/bitlbee/bitlbee-3.0.3-4.fc16.src.rpm And see if it works. Miroslav we need to turn the mock_run(unconfined_t) off.
Fixed in selinux-policy-3.9.16-37.fc15. Btw. for the last issue we have "mock_enable_homedirs" boolean.