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

Side by Side Diff: mock_system_utils.h

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, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « child_job_unittest.cc ('k') | session_manager_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef LOGIN_MANAGER_MOCK_SYSTEM_UTILS_H_ 5 #ifndef LOGIN_MANAGER_MOCK_SYSTEM_UTILS_H_
6 #define LOGIN_MANAGER_MOCK_SYSTEM_UTILS_H_ 6 #define LOGIN_MANAGER_MOCK_SYSTEM_UTILS_H_
7 7
8 #include "login_manager/system_utils.h" 8 #include "login_manager/system_utils.h"
9 9
10 #include <unistd.h> 10 #include <unistd.h>
11 #include <gmock/gmock.h> 11 #include <gmock/gmock.h>
12 12
13 namespace login_manager { 13 namespace login_manager {
14 class MockSystemUtils : public SystemUtils { 14 class MockSystemUtils : public SystemUtils {
15 public: 15 public:
16 MockSystemUtils() {} 16 MockSystemUtils() {}
17 ~MockSystemUtils() {} 17 ~MockSystemUtils() {}
18 MOCK_METHOD2(kill, int(pid_t pid, int signal)); 18 MOCK_METHOD3(kill, int(pid_t pid, uid_t uid, int signal));
19 MOCK_METHOD2(ChildIsGone, bool(pid_t child_spec, int timeout)); 19 MOCK_METHOD2(ChildIsGone, bool(pid_t child_spec, int timeout));
20 MOCK_METHOD2(EnsureAndReturnSafeFileSize, 20 MOCK_METHOD2(EnsureAndReturnSafeFileSize,
21 bool(const FilePath& file, int32* file_size_32)); 21 bool(const FilePath& file, int32* file_size_32));
22 MOCK_METHOD2(EnsureAndReturnSafeSize, 22 MOCK_METHOD2(EnsureAndReturnSafeSize,
23 bool(int64 size_64, int32* size_32)); 23 bool(int64 size_64, int32* size_32));
24 }; 24 };
25 } // namespace login_manager 25 } // namespace login_manager
26 26
27 #endif // LOGIN_MANAGER_MOCK_SYSTEM_UTILS_H_ 27 #endif // LOGIN_MANAGER_MOCK_SYSTEM_UTILS_H_
OLDNEW
« no previous file with comments | « child_job_unittest.cc ('k') | session_manager_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698