Bug 229724

Summary: Can't change brightness due to SELinux policy on HAL scripts
Product: [Fedora] Fedora Reporter: Bastien Nocera <bnocera>
Component: selinux-policy-targetedAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 6CC: davidz
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Current Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-09-12 13:08:05 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 227501    

Description Bastien Nocera 2007-02-22 17:59:16 EST
selinux-policy-2.4.6-40.fc6
selinux-policy-targeted-2.4.6-40.fc6

Trying to change the brightness on the desktop, using gnome-power-manager, I get
avc errors with selinux in enforcing mode.

Feb 22 22:55:30 randel kernel: audit(1172184930.763:333): avc:  denied  { write
} for  pid=2053 comm="hal-system-lcd-" name="sonypi" dev=proc ino=-268434518
scontext=user_u:system_r:hald_t:s0 tcontext=system_u:object_r:sysctl_irq_t:s0
tclass=dir

$ ls -lZ /dev/sonypi 
crw-------  root root system_u:object_r:device_t       /dev/sonypi
$ ls -lZ /usr/lib/hal/scripts/linux/hal-system-lcd-*
-rwxr-xr-x  root root system_u:object_r:lib_t         
/usr/lib/hal/scripts/linux/hal-system-lcd-get-brightness-linux
-rwxr-xr-x  root root system_u:object_r:lib_t         
/usr/lib/hal/scripts/linux/hal-system-lcd-set-brightness-linux
$ ls -lZ /usr/lib/hal/scripts/hal-system-lcd-*
-rwxr-xr-x  root root system_u:object_r:lib_t         
/usr/lib/hal/scripts/hal-system-lcd-get-brightness
-rwxr-xr-x  root root system_u:object_r:lib_t         
/usr/lib/hal/scripts/hal-system-lcd-set-brightness

$ cat /etc/sysconfig/selinux 
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX=enforcing
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted

# SETLOCALDEFS= Check local definition changes
SETLOCALDEFS=0
Comment 1 Daniel Walsh 2007-03-20 12:00:38 EDT
Fixed in selinux-policy-2.4.6-46
Comment 2 Daniel Walsh 2007-09-12 13:08:05 EDT
Moving modified bugs to closed