Hide Forgot
SELinux is preventing /usr/bin/python from 'read' accesses on the fichier apanov-heuristica-fonts-0.4-1.f14.src.rpm. ***** Plugin catchall_labels (83.8 confidence) suggests ******************** If vous souhaitez autoriser python à accéder à read sur apanov-heuristica-fonts-0.4-1.f14.src.rpm file Then you need to change the label on apanov-heuristica-fonts-0.4-1.f14.src.rpm Do # semanage fcontext -a -t FILE_TYPE 'apanov-heuristica-fonts-0.4-1.f14.src.rpm' where FILE_TYPE is one of the following: proc_net_t, samba_var_t, abrt_var_run_t, mock_var_lib_t, rpm_var_lib_t, net_conf_t, httpd_sys_rw_content_t, init_exec_t, mock_exec_t, sysctl_crypto_t, sysctl_kernel_t, mock_tmp_t, abrt_t, lib_t, afs_cache_t, abrt_helper_exec_t, bin_t, cert_t, ld_so_t, user_cron_spool_t, usr_t, textrel_shlib_t, sssd_public_t, locale_t, etc_t, mock_t, proc_t, sysfs_t, rpm_script_tmp_t, ldconfig_exec_t, krb5_conf_t, rpm_exec_t, security_t, mock_cache_t, mount_exec_t, shell_exec_t, ld_so_cache_t, sysctl_irq_t, fusermount_exec_t, domain, net_conf_t, cert_t, user_home_t. Then execute: restorecon -v 'apanov-heuristica-fonts-0.4-1.f14.src.rpm' ***** Plugin catchall (17.1 confidence) suggests *************************** If you believe that python should be allowed read access on the apanov-heuristica-fonts-0.4-1.f14.src.rpm file 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 mock /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp Additional Information: Source Context unconfined_u:unconfined_r:mock_t:s0-s0:c0.c1023 Target Context unconfined_u:object_r:var_lib_t:s0 Target Objects apanov-heuristica-fonts-0.4-1.f14.src.rpm [ file ] Source mock Source Path /usr/bin/python Port <Inconnu> Host (removed) Source RPM Packages python-2.7.1-6.fc15 Target RPM Packages Policy RPM selinux-policy-3.9.16-10.fc15 Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 2.6.39-0.rc1.git1.0.fc16.x86_64 #1 SMP Thu Mar 31 21:15:45 UTC 2011 x86_64 x86_64 Alert Count 1 First Seen lun. 04 avril 2011 20:14:32 CEST Last Seen lun. 04 avril 2011 20:14:32 CEST Local ID 2b345d86-d0fb-407f-9736-ab997f08d77c Raw Audit Messages type=AVC msg=audit(1301940872.739:18793): avc: denied { read } for pid=11936 comm="mock" name="apanov-heuristica-fonts-0.4-1.f14.src.rpm" dev=dm-1 ino=262265 scontext=unconfined_u:unconfined_r:mock_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file type=AVC msg=audit(1301940872.739:18793): avc: denied { open } for pid=11936 comm="mock" name="apanov-heuristica-fonts-0.4-1.f14.src.rpm" dev=dm-1 ino=262265 scontext=unconfined_u:unconfined_r:mock_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file type=SYSCALL msg=audit(1301940872.739:18793): arch=x86_64 syscall=open success=yes exit=EIO a0=2228e90 a1=0 a2=1ff a3=2d73746e6f662d61 items=0 ppid=3939 pid=11936 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts3 ses=415 comm=mock exe=/usr/bin/python subj=unconfined_u:unconfined_r:mock_t:s0-s0:c0.c1023 key=(null) Hash: mock,mock_t,var_lib_t,file,read audit2allow #============= mock_t ============== allow mock_t var_lib_t:file { read open }; audit2allow -R #============= mock_t ============== allow mock_t var_lib_t:file { read open };
What directory is apanov-heuristica-fonts-0.4-1.f14.src.rpm in? /var/lib/mock Should be labeled system_u:object_r:mock_var_lib_t:s0
It's under /var/lib/mock-builder (the utility user I use to prepare rpms I feed to mock)
Is that a standard directory? If you label it mock_var_lib_t it should all work. # semanage fcontext -a -t mock_var_lib_t '/var/lib/mock-builder(/.*)?' # restorecon -R -v /var/lib/mock-builder
No, there are no specific conventions for mock builder home (I don't want it under /home because I consider /home is for human users, and the builder is a utility user) mock setup is described on http://fedoraproject.org/wiki/Projects/Mock#Setup Please document the new selinux magic here at least (maybe in the man page too)