Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1484)

Unified Diff: sandbox/linux/services/yama_unittests.cc

Issue 1310773006: Update sandbox/linux from upstream (Closed) Base URL: ssh://ssh.github.com/domokit/mojo.git@master
Patch Set: Update to 3909ebfa69566f7374a6900e63cd4d3c73a35378 Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sandbox/linux/services/yama_unittests.cc
diff --git a/sandbox/linux/services/yama_unittests.cc b/sandbox/linux/services/yama_unittests.cc
index a4100a6c37d346d0ca5af6e230444f3bc44cb596..0e8355d08e6c3fdf1820b2c594761a8f6c3f6f57 100644
--- a/sandbox/linux/services/yama_unittests.cc
+++ b/sandbox/linux/services/yama_unittests.cc
@@ -10,6 +10,7 @@
#include <unistd.h>
#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/compiler_specific.h"
#include "base/posix/eintr_wrapper.h"
#include "base/strings/string_util.h"
@@ -30,8 +31,9 @@ bool HasLinux32Bug() {
bool is_kernel_64bit =
base::SysInfo::OperatingSystemArchitecture() == "x86_64";
bool is_linux = base::SysInfo::OperatingSystemName() == "Linux";
- bool is_3_dot_2 = StartsWithASCII(
- base::SysInfo::OperatingSystemVersion(), "3.2", /*case_sensitive=*/false);
+ bool is_3_dot_2 = base::StartsWith(
+ base::SysInfo::OperatingSystemVersion(), "3.2",
+ base::CompareCase::INSENSITIVE_ASCII);
if (is_kernel_64bit && is_linux && is_3_dot_2)
return true;
#endif // defined(__i386__)
@@ -151,14 +153,12 @@ TEST(Yama, RestrictPtraceWorks) {
}
}
-void DoNothing() {}
-
SANDBOX_TEST(Yama, RestrictPtraceIsDefault) {
if (!Yama::IsPresent() || HasLinux32Bug())
return;
CHECK(Yama::DisableYamaRestrictions());
- ScopedProcess process1(base::Bind(&DoNothing));
+ ScopedProcess process1(base::Bind(&base::DoNothing));
if (Yama::IsEnforcing()) {
// Check that process1 is protected by Yama, even though it has
« no previous file with comments | « sandbox/linux/services/thread_helpers_unittests.cc ('k') | sandbox/linux/syscall_broker/broker_host_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698