Stephen Smalley committed aba47a4

Label charge_enabled and permit healthd to access it.

type=1400 audit(1385528301.505:5): avc: denied { write } for pid=114 comm="healthd" name="charge_enabled" dev="sysfs" ino=12333 scontext=u:r:healthd:s0 tcontext=u:object_r:sysfs:s0 tclass=file

Change-Id: Ib3e56520f0057b9c45a009db2ba0d455f72561c3
Signed-off-by: Stephen Smalley <>

Comments (0)

Files changed (4)

 	app.te \
 	device.te \
 	domain.te \
+	healthd.te \
 	gpsd.te \
 	file.te \
 	mediaserver.te \
 type ffs, fs_type;
+type sysfs_charge_enabled, fs_type, sysfs_type;


 /factory/bluetooth(/.*)?        u:object_r:bluetooth_efs_file:s0
 /system/bin/mcDriverDaemon  --  u:object_r:tee_exec:s0
+/sys/devices/virtual/power_supply/manta-battery/charge_enabled u:object_r:sysfs_charge_enabled:s0


+allow healthd sysfs_charge_enabled:file rw_file_perms;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.