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

Unified Diff: 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, 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 | « session_manager_unittest.cc ('k') | system_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: system_utils.h
diff --git a/system_utils.h b/system_utils.h
index acba9f4cf3619ea741911a8440625f3bc59b1a85..e62c0092deebd8bce27d6bc0fe1e0f1949594435 100644
--- a/system_utils.h
+++ b/system_utils.h
@@ -17,7 +17,10 @@ class SystemUtils {
SystemUtils();
virtual ~SystemUtils();
- virtual int kill(pid_t pid, int signal);
+ // Sends |signal| to |pid|, with uid and euid set to |owner|.
+ // NOTE: Your saved UID is kept unchanged. If you expect to drop and regain
+ // root privs, MAKE SURE YOUR suid == 0.
+ virtual int kill(pid_t pid, uid_t owner, int signal);
// Returns: true if child specified by |child_spec| exited,
// false if we time out.
« no previous file with comments | « session_manager_unittest.cc ('k') | system_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698