Require CAP_SYS_CHROOT in ChrootTest.ProcMountsMountinfoNoEscape.

PiperOrigin-RevId: 228949227
Change-Id: I8f47bcd56aab706081218ec7498af8049ccd6d63
This commit is contained in:
Jamie Liu
2019-01-11 14:48:26 -08:00
committed by Shentubot
parent 1bcc1229e8
commit 290bcb6de9
+1
View File
@@ -280,6 +280,7 @@ TEST(ChrootTest, ProcMemSelfMapsNoEscapeProcOpen) {
// /proc/self/mountinfo.
TEST(ChrootTest, ProcMountsMountinfoNoEscape) {
SKIP_IF(!ASSERT_NO_ERRNO_AND_VALUE(HaveCapability(CAP_SYS_ADMIN)));
SKIP_IF(!ASSERT_NO_ERRNO_AND_VALUE(HaveCapability(CAP_SYS_CHROOT)));
// We are going to create some mounts and then chroot. In order to be able to
// unmount the mounts after the test run, we must chdir to the root and use