OSDN Git Service

avoid fs_mkdirs when SD card removed
authorCylen Yao <cylen.yao@mediatek.com>
Fri, 2 May 2014 11:23:42 +0000 (19:23 +0800)
committerTodd Poynor <toddpoynor@google.com>
Thu, 15 May 2014 03:42:13 +0000 (20:42 -0700)
commit27cfee3fa4e44d3a542312938df12cadfad3425e
tree77460df468273419556c412b8c2e28cc78c17ce3
parent8c008397141bf9a7d619eb2c53452bf3e397da39
avoid fs_mkdirs when SD card removed

Must limit vold calls to fs_mkdirs() only when the volume is mounted.
If NOT, it will trigger selinux warning as follows.
audit(1398835637.785:8): avc:  denied  { write } for  pid=137 comm="vold" name="sdcard0" dev="rootfs" ino=3191 scontext=u:r:vold:s0 tcontext=u:object_r:rootfs:s0 tclass=dir

Change-Id: I1113fc961cbdd8bbd2fcbf740c2f504628c8399d
Signed-off-by: Cylen Yao <cylen.yao@mediatek.com>
VolumeManager.cpp