Merge "ashmem: ensure ashmem fds are CLOEXEC."
diff --git a/fs_mgr/liblp/partition_opener.cpp b/fs_mgr/liblp/partition_opener.cpp
index 3d3dde6..4696ff1 100644
--- a/fs_mgr/liblp/partition_opener.cpp
+++ b/fs_mgr/liblp/partition_opener.cpp
@@ -38,6 +38,9 @@
namespace {
std::string GetPartitionAbsolutePath(const std::string& path) {
+#if !defined(__ANDROID__)
+ return path;
+#else
if (android::base::StartsWith(path, "/")) {
return path;
}
@@ -56,6 +59,7 @@
}
}
return by_name;
+#endif
}
bool GetBlockDeviceInfo(const std::string& block_device, BlockDeviceInfo* device_info) {
diff --git a/fs_mgr/libsnapshot/Android.bp b/fs_mgr/libsnapshot/Android.bp
index 77d21b2..04d7e27 100644
--- a/fs_mgr/libsnapshot/Android.bp
+++ b/fs_mgr/libsnapshot/Android.bp
@@ -145,6 +145,7 @@
"libsnapshot_cow_defaults",
],
host_supported: true,
+ recovery_available: true,
shared_libs: [
"libbase",
"libcrypto",
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 44c8f27..faedd44 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -657,6 +657,15 @@
mkdir /data/vendor/tombstones 0771 root root
mkdir /data/vendor/tombstones/wifi 0771 wifi wifi
+ # Create directories to push tests to for each linker namespace.
+ # Create the subdirectories in case the first test is run as root
+ # so it doesn't end up owned by root.
+ mkdir /data/local/tests 0700 shell shell
+ mkdir /data/local/tests/product 0700 shell shell
+ mkdir /data/local/tests/system 0700 shell shell
+ mkdir /data/local/tests/unrestricted 0700 shell shell
+ mkdir /data/local/tests/vendor 0700 shell shell
+
# create dalvik-cache, so as to enforce our permissions
mkdir /data/dalvik-cache 0771 root root encryption=Require
# create the A/B OTA directory, so as to enforce our permissions