| Index: tools/exception_port_tool.cc
|
| diff --git a/tools/exception_port_tool.cc b/tools/exception_port_tool.cc
|
| index bcca29fcdd5ec0096f11c181fd20ffe4fe2e0750..81eca6bbf204db283f63e8bcf11f3b23a229bc77 100644
|
| --- a/tools/exception_port_tool.cc
|
| +++ b/tools/exception_port_tool.cc
|
| @@ -34,6 +34,7 @@
|
| #include "util/mach/mach_extensions.h"
|
| #include "util/mach/symbolic_constants_mach.h"
|
| #include "util/mach/task_for_pid.h"
|
| +#include "util/posix/drop_privileges.h"
|
| #include "util/stdlib/string_number_conversion.h"
|
|
|
| namespace crashpad {
|
| @@ -503,6 +504,10 @@ int ExceptionPortToolMain(int argc, char* argv[]) {
|
| alternate_task_owner.reset(options.alternate_task);
|
| }
|
|
|
| + // This tool may have been installed as a setuid binary so that TaskForPID()
|
| + // could succeed. Drop any privileges now that they’re no longer necessary.
|
| + DropPrivileges();
|
| +
|
| MachSendRightPool mach_send_right_pool;
|
|
|
| // Show bootstrap services requested.
|
|
|