Allow kernel to write to shell_data_file loop devices in userdebug builds.
Tests around Virtual A/B, DSUs, remount etc need to create loop devices and write to them, which requires the kernel domain to have file write access. However there are very few contexts where this is allowed, and most are for testing. These testing locations are not consistently available (eg, /data/nativetest does not always exist). We already allow readonly loop devices in /data/local/tmp for testing purposes, so this adds write support as well (userdebug/eng only). Bug: 218976943 Test: fiemap_image_test Change-Id: Ic83ff5ef57241215240228ecaee3d9d07ff31d8e
This commit is contained in:
parent
d5098f99a9
commit
568fd1f0ad
1 changed files with 3 additions and 3 deletions
|
@ -95,10 +95,10 @@ allow kernel {
|
|||
staging_data_file
|
||||
vendor_apex_file
|
||||
}:file read;
|
||||
# Also allow the kernel to read /data/local/tmp files via loop device
|
||||
# for ApexTestCases
|
||||
# Also allow the kernel to read/write /data/local/tmp files via loop device
|
||||
# for ApexTestCases and fiemap_image_test.
|
||||
userdebug_or_eng(`
|
||||
allow kernel shell_data_file:file read;
|
||||
allow kernel shell_data_file:file { read write };
|
||||
')
|
||||
|
||||
# Allow the first-stage init (which is running in the kernel domain) to execute the
|
||||
|
|
Loading…
Reference in a new issue