OSDN Git Service

Set SELinux contexts on device nodes created by vold.
authorStephen Smalley <sds@tycho.nsa.gov>
Tue, 30 Sep 2014 14:29:24 +0000 (10:29 -0400)
committerStephen Smalley <sds@tycho.nsa.gov>
Tue, 30 Sep 2014 19:35:28 +0000 (15:35 -0400)
commit684e662502a310868da052192b80604234b66711
tree9e635248d15b9e0ddfc61c659577b406c7334707
parent6efa9351a257edc53ce07eb8c544ccf08efb64ae
Set SELinux contexts on device nodes created by vold.

Extend vold to look up and set SELinux contexts on the
device nodes it creates for extra loop devices and for volumes.
Prior to this change, these device nodes simply inherited the type
of their parent directory /dev/block, i.e. block_device, and vold
therefore required create_file perms to block_device:blk_file.
With this change we can scope vold down to accessing specific
block device types.

This depends on change Id3bea28f5958086716cd3db055bea309b3b5fa5a
to allow vold to use setfscreatecon().

Change-Id: Ib9e8294abb1da94d92503947603ec12e802ff08c
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Loop.cpp
Volume.cpp
main.cpp
sehandle.h [new file with mode: 0644]