mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
Also, move ProcessArgumentsForPID() into ProcessInfo. This change prepares for a TaskForPID() implementation that’s capable of operating correctly in a setuid root executable. TaskForPID() belongs in util/mach, but for its permission checks, it must access some process properties that were previously fetched by ProcessReader in snapshot. util can’t depend on snapshot. The generic util-safe process information bits (Is64Bit(), ProcessID(), ParentProcessID(), and StartTime()) are moved from ProcessReader to ProcessInfo (in util), where the current ProcessReader can use it (as it’s OK for snapshot to depend on util), and the future TaskForPID() in util can also use it. ProcessInfo also contains other methods that TaskForPID() will use, providing access to the credentials that the target process holds. ProcessArgumentsForPID() is related, and is also now a part of ProcessInfo. TEST=snapshot_test, util_test R=rsesek@chromium.org Review URL: https://codereview.chromium.org/727973002
Description
Languages
C++
92.5%
Objective-C++
2.5%
C
2%
Python
1.8%
Assembly
0.9%
Other
0.3%