Replace deprecated AddTmpfs call

PiperOrigin-RevId: 413907279
Change-Id: I3a32be4b19acab8b2b2092961df3dd9f3699261b
This commit is contained in:
Wiktor Garbacz 2021-12-03 04:56:01 -08:00 committed by Copybara-Service
parent 4a6e005155
commit c3308b56fc
2 changed files with 2 additions and 2 deletions

View File

@ -157,7 +157,7 @@ int main(int argc, char** argv) {
builder.AllowUnrestrictedNetworking();
}
if (absl::GetFlag(FLAGS_sandbox2tool_mount_tmp)) {
builder.AddTmpfs("/tmp");
builder.AddTmpfs("/tmp", /*size=*/4ULL << 20 /* 4 MiB */);
}
std::string mounts_string =

View File

@ -127,7 +127,7 @@ TEST_F(PolicyBuilderTest, Testpolicy_size) {
// None of the namespace functions should alter the seccomp policy.
builder.AddFile("/usr/bin/find"); assert_same();
builder.AddDirectory("/bin"); assert_same();
builder.AddTmpfs("/tmp"); assert_same();
builder.AddTmpfs("/tmp", /*size=*/4ULL << 20 /* 4 MiB */); assert_same();
builder.AllowUnrestrictedNetworking(); assert_same();
// clang-format on
}