Commits

Stephen Smalley committed aba47a4

Label charge_enabled and permit healthd to access it.

Resolves:
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 <sds@tycho.nsa.gov>

  • Participants
  • Parent commits c93b562
  • Branches seandroid-4.4.2

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;

sepolicy/file_contexts

 /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

sepolicy/healthd.te

+allow healthd sysfs_charge_enabled:file rw_file_perms;