Enable permission checks for zipfuse filesystems
Now that zipfuse returns correct access mode for its dirs and files,
turn on the kernel-side permission check.
Also removed a check for the .so file in the apk because the file is no
longer accessible from the test.
Bug: 264668376
Test: run microdroid tests
Change-Id: Ib321e2a2b84af2cf3766ebbbee40bd7340c9f6d7
diff --git a/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java b/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java
index e02f85f..464e091 100644
--- a/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java
+++ b/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java
@@ -678,9 +678,6 @@
// Check if the native library in the APK is has correct filesystem info
final String[] abis = microdroid.run("getprop", "ro.product.cpu.abilist").split(",");
assertThat(abis).hasLength(1);
- final String testLib = "/mnt/apk/lib/" + abis[0] + "/MicrodroidTestNativeLib.so";
- final String label = "u:object_r:system_file:s0";
- assertThat(microdroid.run("ls", "-Z", testLib)).isEqualTo(label + " " + testLib);
// Check that no denials have happened so far
CommandRunner android = new CommandRunner(getDevice());
diff --git a/zipfuse/src/main.rs b/zipfuse/src/main.rs
index 9411759..fd7e414 100644
--- a/zipfuse/src/main.rs
+++ b/zipfuse/src/main.rs
@@ -87,6 +87,7 @@
let mut mount_options = vec![
MountOption::FD(dev_fuse.as_raw_fd()),
+ MountOption::DefaultPermissions,
MountOption::RootMode(libc::S_IFDIR | libc::S_IXUSR | libc::S_IXGRP | libc::S_IXOTH),
MountOption::AllowOther,
MountOption::UserId(0),