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

Side by Side Diff: child_job.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, 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | child_job.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) 2009-2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009-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_CHILD_JOB_H_ 5 #ifndef LOGIN_MANAGER_CHILD_JOB_H_
6 #define LOGIN_MANAGER_CHILD_JOB_H_ 6 #define LOGIN_MANAGER_CHILD_JOB_H_
7 7
8 #include <gtest/gtest.h> 8 #include <gtest/gtest.h>
9 #include <time.h> 9 #include <time.h>
10 #include <unistd.h> 10 #include <unistd.h>
11 11
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 static const int kBWSI; 66 static const int kBWSI;
67 67
68 }; 68 };
69 69
70 70
71 class ChildJob : public ChildJobInterface { 71 class ChildJob : public ChildJobInterface {
72 public: 72 public:
73 explicit ChildJob(const std::vector<std::string>& arguments); 73 explicit ChildJob(const std::vector<std::string>& arguments);
74 virtual ~ChildJob(); 74 virtual ~ChildJob();
75 75
76 // Overridden from ChildJob 76 // Overridden from ChildJobInterface
77 virtual bool ShouldStop() const; 77 virtual bool ShouldStop() const;
78 virtual void RecordTime(); 78 virtual void RecordTime();
79 virtual void Run(); 79 virtual void Run();
80 virtual void StartSession(const std::string& email); 80 virtual void StartSession(const std::string& email);
81 virtual void StopSession(); 81 virtual void StopSession();
82 virtual uid_t GetDesiredUid() const; 82 virtual uid_t GetDesiredUid() const;
83 virtual void SetDesiredUid(uid_t uid); 83 virtual void SetDesiredUid(uid_t uid);
84 virtual bool IsDesiredUidSet() const; 84 virtual bool IsDesiredUidSet() const;
85 virtual const std::string GetName() const; 85 virtual const std::string GetName() const;
86 virtual void SetArguments(const std::string& arguments); 86 virtual void SetArguments(const std::string& arguments);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 FRIEND_TEST(ChildJobTest, ShouldNotStopTest); 130 FRIEND_TEST(ChildJobTest, ShouldNotStopTest);
131 FRIEND_TEST(ChildJobTest, StartStopSessionTest); 131 FRIEND_TEST(ChildJobTest, StartStopSessionTest);
132 FRIEND_TEST(ChildJobTest, StartStopSessionFromLoginTest); 132 FRIEND_TEST(ChildJobTest, StartStopSessionFromLoginTest);
133 FRIEND_TEST(ChildJobTest, SetArguments); 133 FRIEND_TEST(ChildJobTest, SetArguments);
134 DISALLOW_COPY_AND_ASSIGN(ChildJob); 134 DISALLOW_COPY_AND_ASSIGN(ChildJob);
135 }; 135 };
136 136
137 } // namespace login_manager 137 } // namespace login_manager
138 138
139 #endif // LOGIN_MANAGER_CHILD_JOB_H_ 139 #endif // LOGIN_MANAGER_CHILD_JOB_H_
140
OLDNEW
« no previous file with comments | « no previous file | child_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698