libreport version: 2.0.10 executable: /usr/bin/python2.7 hashmarkername: setroubleshoot kernel: 3.4.6-2.fc17.x86_64 time: Tue 24 Jul 2012 01:28:40 PM PDT description: :SELinux is preventing /usr/bin/bash from 'read' accesses on the directory power_supply. : :***** Plugin catchall (100. confidence) suggests *************************** : :If you believe that bash should be allowed read access on the power_supply 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 on_ac_power /var/log/audit/audit.log | audit2allow -M mypol :# semodule -i mypol.pp : :Additional Information: :Source Context system_u:system_r:prelink_cron_system_t:s0-s0:c0.c : 1023 :Target Context system_u:object_r:sysfs_t:s0 :Target Objects power_supply [ dir ] :Source on_ac_power :Source Path /usr/bin/bash :Port <Unknown> :Host (removed) :Source RPM Packages bash-4.2.36-1.fc17.x86_64 :Target RPM Packages :Policy RPM selinux-policy-3.10.0-140.fc17.noarch :Selinux Enabled True :Policy Type targeted :Enforcing Mode Enforcing :Host Name (removed) :Platform Linux (removed) 3.4.6-2.fc17.x86_64 #1 SMP Thu Jul : 19 22:54:16 UTC 2012 x86_64 x86_64 :Alert Count 2 :First Seen Fri 20 Jul 2012 01:28:26 PM PDT :Last Seen Tue 24 Jul 2012 01:27:49 PM PDT :Local ID 8dad9204-7335-449b-a61b-7bb11436008b : :Raw Audit Messages :type=AVC msg=audit(1343161669.10:288): avc: denied { read } for pid=15405 comm="on_ac_power" name="power_supply" dev="sysfs" ino=2992 scontext=system_u:system_r:prelink_cron_system_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sysfs_t:s0 tclass=dir : : :type=SYSCALL msg=audit(1343161669.10:288): arch=x86_64 syscall=openat success=no exit=EACCES a0=ffffffffffffff9c a1=267c220 a2=90800 a3=0 items=0 ppid=15403 pid=15405 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm=on_ac_power exe=/usr/bin/bash subj=system_u:system_r:prelink_cron_system_t:s0-s0:c0.c1023 key=(null) : :Hash: on_ac_power,prelink_cron_system_t,sysfs_t,dir,read : :audit2allowunable to open /sys/fs/selinux/policy: Permission denied : : :audit2allow -Runable to open /sys/fs/selinux/policy: Permission denied : :
I can not see how this happens, but it makes some sense that you would not want to prelink when you are not on AC Power.
Per a suggestion in the dev mailing list, I added the following lines to /etc/cron.daily/prelink: #local patch to exit on battery power on_ac_power || exit It was suggested that this patch be added to Fedora, and it seems like a good idea. Should selinux allow the access? Thanks, Gene
See https://bugzilla.redhat.com/show_bug.cgi?id=840557 by Jan Kratochvil. Thanks again, Gene
Ok that explains it, yes SELinux should allow it.
*** Bug 844489 has been marked as a duplicate of this bug. ***
dev_read_sysfs(prelink_cron_system_t)
Added.
selinux-policy-3.10.0-156.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-156.fc17
Package selinux-policy-3.10.0-156.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-156.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-16347/selinux-policy-3.10.0-156.fc17 then log in and leave karma (feedback).
selinux-policy-3.10.0-156.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.