From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050512 Fedora/1.0.4-2 Firefox/1.0.4 Description of problem: Future versions of parted are going to be using files under /sys/block/<device> to get information about that device (for instance, the model and manufacturer name). Currently, this is not allowed by targeted policy resulting in an EACCESS when attempting to read: type=AVC msg=audit(1117829236.044:1047962): avc: denied { read } for pid=3201 comm="parted" name=device dev=sysfs ino=3402 scontext=root:system_r:fsadm_t tcontext=system_u:object_r:sysfs_t tclass=lnk_file Here, the file I am trying to read is /sys/block/sda/device/vendor. Paul Nasrat has come up with the following patch to the policy to allow parted to read from /sys: --- fsadm.te 2005-05-28 01:23:13.000000000 -0400 +++ /home/clumens/fsadm.te 2005-06-03 16:20:28.000000000 -0400 @@ -19,7 +19,7 @@ general_domain_access(fsadm_t) # for swapon -allow fsadm_t sysfs_t:dir { search getattr }; +allow fsadm_t sysfs_t:dir { search getattr read }; # Read system information files in /proc. r_dir_file(fsadm_t, proc_t) @@ -43,13 +43,15 @@ allow fsadm_t device_t:dir r_dir_perms; allow fsadm_t device_t:lnk_file r_file_perms; +# Read /sys files and links +allow fsadm_t sysfs_t:{ file lnk_file } r_file_perms; + uses_shlib(fsadm_t) type fsadm_exec_t, file_type, sysadmfile, exec_type; domain_auto_trans(initrc_t, fsadm_exec_t, fsadm_t) Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Apply patches from parted CVS, rebuild and install. 2. Run new parted watch as it falls back on older code (you'll see a warning about using a deprecated scsi ioctl in dmesg). Additional info:
Fixed in selinux-policy-targeted-1.23.18-1