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

Unified Diff: child_job_unittest.cc

Issue 3493012: Security patches: RestartJob ignores pid, argv[0]; kill runs as child UID (Closed) Base URL: http://git.chromium.org/git/login_manager.git
Patch Set: added comments, using -1 as suid in setresuid() calls Created 10 years, 3 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
« no previous file with comments | « child_job.cc ('k') | mock_system_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: child_job_unittest.cc
diff --git a/child_job_unittest.cc b/child_job_unittest.cc
index ab99c6675c1ea0f694ad4317a83da3bada5461bf..b65b3e61e1d5e9a494e682e4f8de1a97fad982c2 100644
--- a/child_job_unittest.cc
+++ b/child_job_unittest.cc
@@ -130,7 +130,8 @@ TEST(ChildJobTest, SetArguments) {
job.SetArguments(kNewArgsString);
ASSERT_EQ(arraysize(kNewArgsArray), job.arguments_.size());
- for (size_t i = 0; i < arraysize(kNewArgsArray); ++i) {
+ EXPECT_EQ(argv[0], job.arguments_[0]);
+ for (size_t i = 1; i < arraysize(kNewArgsArray); ++i) {
EXPECT_EQ(kNewArgsArray[i], job.arguments_[i]);
}
}
« no previous file with comments | « child_job.cc ('k') | mock_system_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698