Skip to content
Snippets Groups Projects
Commit fd8f305b authored by William Roberts's avatar William Roberts
Browse files

storaged: add permissions for dumpstate


The service "storaged" implememnts a dump() interface for
dumpsys, and thus it needs to write its state to the fd
provided by dumpstate.

To correct this, and fix dumpstate, allow the permission.

Fixes:
avc: denied { use } for pid=3298 comm="dumpsys" path="pipe:[33470]" dev="pipefs" ino=33470 scontext=u:r:storaged:s0 tcontext=u:r:dumpstate:s0 tclass=fd permissive=0

Test:
With a device that has storaged, issue the command:
$ adb shell dumpstate

Change-Id: I515e20f0328b6edc01ea2a7c53b1d3c4ca0e72ac
Signed-off-by: default avatarWilliam Roberts <william.c.roberts@intel.com>
parent 7f4b2ad5
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,9 @@ binder_call(storaged, system_server)
allow storaged batteryproperties_service:service_manager find;
binder_call(storaged, healthd)
# Implements a dumpsys interface.
allow storaged dumpstate:fd use;
# Kernel does extra check on CAP_DAC_OVERRIDE for libbinder when storaged is
# running as root. See b/35323867 #3.
dontaudit storaged self:capability dac_override;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment