summaryrefslogtreecommitdiff
path: root/common/test_utils.cc
diff options
context:
space:
mode:
authorAlex Deymo <deymo@google.com>2016-03-01 18:55:54 -0800
committerAlex Deymo <deymo@google.com>2016-03-01 18:55:54 -0800
commit14dbd333439f34c648b9f783ffa656ef565de0cc (patch)
treea55f35b1d7231658201759cc51079e5b3be08acf /common/test_utils.cc
parent390efedcb7e17587da765b6d682077cb7fa46ee1 (diff)
Mount the new system as 'postinstall_file' in postinstall.
When mounting the new filesystem on /postinstall, we need to override the file attributes from the new system (unknown to the current selinux policies) with a consistent label that will be used only in the context of postinstall. This patch passes an extra option to mount(2) in Brillo and Android to achieve this. Bug: 27177071 TEST=Deployed a postinstall script with `ls -laZ`, contents show "postinstall_file". Change-Id: Ia43b45c92e4c4cd340a884818ac00f24a418f9e7
Diffstat (limited to 'common/test_utils.cc')
-rw-r--r--common/test_utils.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/test_utils.cc b/common/test_utils.cc
index a574863f..77a91419 100644
--- a/common/test_utils.cc
+++ b/common/test_utils.cc
@@ -260,7 +260,7 @@ ScopedLoopMounter::ScopedLoopMounter(const string& file_path,
string loop_dev;
loop_binder_.reset(new ScopedLoopbackDeviceBinder(file_path, &loop_dev));
- EXPECT_TRUE(utils::MountFilesystem(loop_dev, *mnt_path, flags, ""));
+ EXPECT_TRUE(utils::MountFilesystem(loop_dev, *mnt_path, flags, "", nullptr));
unmounter_.reset(new ScopedFilesystemUnmounter(*mnt_path));
}