2014-08-01 12:48:28 -04:00
|
|
|
|
# Copyright 2014 The Crashpad Authors. All rights reserved.
|
|
|
|
|
#
|
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
|
#
|
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
#
|
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
|
|
{
|
2015-03-08 15:17:22 -04:00
|
|
|
|
'includes': [
|
|
|
|
|
'../build/crashpad.gypi',
|
|
|
|
|
],
|
2014-08-01 12:48:28 -04:00
|
|
|
|
'targets': [
|
|
|
|
|
{
|
2015-03-08 16:25:34 -04:00
|
|
|
|
'target_name': 'crashpad_util',
|
2014-08-01 12:48:28 -04:00
|
|
|
|
'type': 'static_library',
|
|
|
|
|
'dependencies': [
|
2015-03-08 16:25:34 -04:00
|
|
|
|
'../compat/compat.gyp:crashpad_compat',
|
2015-03-09 15:25:42 -04:00
|
|
|
|
'../third_party/mini_chromium/mini_chromium.gyp:base',
|
2014-08-01 12:48:28 -04:00
|
|
|
|
],
|
|
|
|
|
'include_dirs': [
|
|
|
|
|
'..',
|
|
|
|
|
'<(INTERMEDIATE_DIR)',
|
|
|
|
|
],
|
|
|
|
|
'sources': [
|
2014-12-17 14:35:18 -08:00
|
|
|
|
'file/file_io.cc',
|
|
|
|
|
'file/file_io.h',
|
|
|
|
|
'file/file_io_posix.cc',
|
|
|
|
|
'file/file_io_win.cc',
|
2015-02-18 14:15:38 -05:00
|
|
|
|
'file/file_reader.cc',
|
|
|
|
|
'file/file_reader.h',
|
2015-02-18 18:22:39 -05:00
|
|
|
|
'file/file_seeker.cc',
|
2015-02-18 14:15:38 -05:00
|
|
|
|
'file/file_seeker.h',
|
2014-08-01 12:48:28 -04:00
|
|
|
|
'file/file_writer.cc',
|
|
|
|
|
'file/file_writer.h',
|
2015-02-18 14:15:38 -05:00
|
|
|
|
'file/string_file.cc',
|
|
|
|
|
'file/string_file.h',
|
2014-08-28 13:47:28 -04:00
|
|
|
|
'mac/checked_mach_address_range.cc',
|
|
|
|
|
'mac/checked_mach_address_range.h',
|
2014-09-22 13:11:40 -04:00
|
|
|
|
'mac/launchd.h',
|
|
|
|
|
'mac/launchd.mm',
|
2014-08-15 22:33:14 -07:00
|
|
|
|
'mac/mac_util.cc',
|
|
|
|
|
'mac/mac_util.h',
|
2014-08-15 22:30:24 -07:00
|
|
|
|
'mac/service_management.cc',
|
|
|
|
|
'mac/service_management.h',
|
2014-12-30 17:39:27 -05:00
|
|
|
|
'mac/xattr.cc',
|
|
|
|
|
'mac/xattr.h',
|
2014-12-11 11:27:18 -05:00
|
|
|
|
'mach/child_port.defs',
|
2014-11-25 14:56:05 -05:00
|
|
|
|
'mach/child_port_handshake.cc',
|
|
|
|
|
'mach/child_port_handshake.h',
|
2014-11-25 14:29:46 -05:00
|
|
|
|
'mach/child_port_server.cc',
|
|
|
|
|
'mach/child_port_server.h',
|
2014-11-24 15:48:10 -05:00
|
|
|
|
'mach/child_port_types.h',
|
2014-12-04 16:45:02 -05:00
|
|
|
|
'mach/composite_mach_message_server.cc',
|
|
|
|
|
'mach/composite_mach_message_server.h',
|
2014-09-16 09:48:01 -04:00
|
|
|
|
'mach/exc_client_variants.cc',
|
|
|
|
|
'mach/exc_client_variants.h',
|
2014-09-10 17:29:07 -04:00
|
|
|
|
'mach/exc_server_variants.cc',
|
|
|
|
|
'mach/exc_server_variants.h',
|
2014-09-16 17:32:35 -04:00
|
|
|
|
'mach/exception_behaviors.cc',
|
|
|
|
|
'mach/exception_behaviors.h',
|
2014-09-16 17:36:33 -04:00
|
|
|
|
'mach/exception_ports.cc',
|
|
|
|
|
'mach/exception_ports.h',
|
2014-09-16 09:48:01 -04:00
|
|
|
|
'mach/mach_extensions.cc',
|
2014-09-10 17:29:07 -04:00
|
|
|
|
'mach/mach_extensions.h',
|
2014-12-02 17:02:32 -05:00
|
|
|
|
'mach/mach_message.cc',
|
|
|
|
|
'mach/mach_message.h',
|
2014-09-08 21:06:34 -04:00
|
|
|
|
'mach/mach_message_server.cc',
|
|
|
|
|
'mach/mach_message_server.h',
|
2014-12-16 14:10:16 -05:00
|
|
|
|
'mach/notify_server.cc',
|
|
|
|
|
'mach/notify_server.h',
|
2014-10-13 18:05:21 -04:00
|
|
|
|
'mach/scoped_task_suspend.cc',
|
|
|
|
|
'mach/scoped_task_suspend.h',
|
2014-09-16 11:00:51 -04:00
|
|
|
|
'mach/symbolic_constants_mach.cc',
|
|
|
|
|
'mach/symbolic_constants_mach.h',
|
2014-11-14 17:56:17 -05:00
|
|
|
|
'mach/task_for_pid.cc',
|
|
|
|
|
'mach/task_for_pid.h',
|
2014-08-03 18:48:40 -04:00
|
|
|
|
'mach/task_memory.cc',
|
|
|
|
|
'mach/task_memory.h',
|
2014-09-24 14:08:48 -04:00
|
|
|
|
'misc/clock.h',
|
|
|
|
|
'misc/clock_mac.cc',
|
2014-12-17 10:45:43 -08:00
|
|
|
|
'misc/clock_posix.cc',
|
|
|
|
|
'misc/clock_win.cc',
|
2014-08-14 09:51:26 -07:00
|
|
|
|
'misc/initialization_state.h',
|
|
|
|
|
'misc/initialization_state_dcheck.cc',
|
|
|
|
|
'misc/initialization_state_dcheck.h',
|
2014-08-26 16:50:08 -04:00
|
|
|
|
'misc/scoped_forbid_return.cc',
|
|
|
|
|
'misc/scoped_forbid_return.h',
|
2014-09-10 17:30:21 -04:00
|
|
|
|
'misc/symbolic_constants_common.h',
|
2015-03-11 17:07:11 -04:00
|
|
|
|
'misc/tri_state.h',
|
2014-08-01 14:39:55 -04:00
|
|
|
|
'misc/uuid.cc',
|
|
|
|
|
'misc/uuid.h',
|
2014-10-24 15:04:25 -04:00
|
|
|
|
'net/http_body.cc',
|
|
|
|
|
'net/http_body.h',
|
2014-10-31 12:17:32 -04:00
|
|
|
|
'net/http_headers.cc',
|
|
|
|
|
'net/http_headers.h',
|
2014-10-29 19:13:24 -04:00
|
|
|
|
'net/http_multipart_builder.cc',
|
|
|
|
|
'net/http_multipart_builder.h',
|
2014-10-31 12:17:32 -04:00
|
|
|
|
'net/http_transport.cc',
|
|
|
|
|
'net/http_transport.h',
|
|
|
|
|
'net/http_transport_mac.mm',
|
2015-01-26 13:31:35 -08:00
|
|
|
|
'net/http_transport_win.cc',
|
2014-08-15 10:22:37 -07:00
|
|
|
|
'numeric/checked_range.h',
|
2014-08-14 16:00:44 -07:00
|
|
|
|
'numeric/in_range_cast.h',
|
2014-09-22 15:46:00 -04:00
|
|
|
|
'numeric/int128.h',
|
2014-08-14 16:00:44 -07:00
|
|
|
|
'numeric/safe_assignment.h',
|
2014-12-19 16:42:34 -05:00
|
|
|
|
'posix/close_multiple.cc',
|
|
|
|
|
'posix/close_multiple.h',
|
2014-12-19 14:20:20 -05:00
|
|
|
|
'posix/close_stdio.cc',
|
|
|
|
|
'posix/close_stdio.h',
|
2014-11-14 18:44:19 -05:00
|
|
|
|
'posix/drop_privileges.cc',
|
|
|
|
|
'posix/drop_privileges.h',
|
Move some parts of ProcessReader (in snapshot) to ProcessInfo (in util).
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
2014-11-14 17:54:42 -05:00
|
|
|
|
'posix/process_info.h',
|
|
|
|
|
'posix/process_info_mac.cc',
|
2014-09-10 17:30:21 -04:00
|
|
|
|
'posix/symbolic_constants_posix.cc',
|
|
|
|
|
'posix/symbolic_constants_posix.h',
|
2014-08-01 14:39:55 -04:00
|
|
|
|
'stdlib/cxx.h',
|
2014-08-03 18:53:10 -04:00
|
|
|
|
'stdlib/objc.h',
|
2014-08-25 17:51:09 -04:00
|
|
|
|
'stdlib/pointer_container.h',
|
2014-09-10 15:30:11 -04:00
|
|
|
|
'stdlib/string_number_conversion.cc',
|
|
|
|
|
'stdlib/string_number_conversion.h',
|
2014-08-01 14:39:55 -04:00
|
|
|
|
'stdlib/strlcpy.cc',
|
|
|
|
|
'stdlib/strlcpy.h',
|
2014-08-28 14:38:27 -04:00
|
|
|
|
'stdlib/strnlen.cc',
|
|
|
|
|
'stdlib/strnlen.h',
|
2015-03-12 14:28:19 -04:00
|
|
|
|
'string/split_string.cc',
|
|
|
|
|
'string/split_string.h',
|
2015-02-10 17:01:58 -05:00
|
|
|
|
'synchronization/semaphore_mac.cc',
|
|
|
|
|
'synchronization/semaphore_posix.cc',
|
|
|
|
|
'synchronization/semaphore_win.cc',
|
2014-09-24 13:32:31 -04:00
|
|
|
|
'synchronization/semaphore.h',
|
2015-03-05 22:07:38 -08:00
|
|
|
|
'win/process_info.cc',
|
|
|
|
|
'win/process_info.h',
|
2015-03-09 16:37:43 -07:00
|
|
|
|
'win/process_structs.h',
|
2014-12-18 09:51:20 -08:00
|
|
|
|
'win/scoped_handle.cc',
|
|
|
|
|
'win/scoped_handle.h',
|
2015-02-20 11:35:04 -08:00
|
|
|
|
'win/time.cc',
|
|
|
|
|
'win/time.h',
|
2014-08-01 12:48:28 -04:00
|
|
|
|
],
|
2014-09-30 13:11:04 -07:00
|
|
|
|
'conditions': [
|
|
|
|
|
['OS=="mac"', {
|
2014-12-11 11:27:18 -05:00
|
|
|
|
'conditions': [
|
|
|
|
|
['GENERATOR=="ninja"', {
|
|
|
|
|
# ninja’s rules can’t deal with sources that have paths relative
|
|
|
|
|
# to environment variables like SDKROOT. Copy the .defs files out
|
|
|
|
|
# of SDKROOT and into a place they can be referenced without any
|
|
|
|
|
# environment variables.
|
|
|
|
|
'copies': [
|
|
|
|
|
{
|
|
|
|
|
'destination': '<(INTERMEDIATE_DIR)/util/mach',
|
|
|
|
|
'files': [
|
|
|
|
|
'$(SDKROOT)/usr/include/mach/exc.defs',
|
|
|
|
|
'$(SDKROOT)/usr/include/mach/mach_exc.defs',
|
2014-12-16 14:10:16 -05:00
|
|
|
|
'$(SDKROOT)/usr/include/mach/notify.defs',
|
2014-12-11 11:27:18 -05:00
|
|
|
|
],
|
|
|
|
|
},
|
2014-11-24 15:48:10 -05:00
|
|
|
|
],
|
2014-12-11 11:27:18 -05:00
|
|
|
|
'sources': [
|
|
|
|
|
'<(INTERMEDIATE_DIR)/util/mach/exc.defs',
|
|
|
|
|
'<(INTERMEDIATE_DIR)/util/mach/mach_exc.defs',
|
2014-12-16 14:10:16 -05:00
|
|
|
|
'<(INTERMEDIATE_DIR)/util/mach/notify.defs',
|
2014-11-24 15:48:10 -05:00
|
|
|
|
],
|
2014-12-11 11:27:18 -05:00
|
|
|
|
}, { # else: GENERATOR!="ninja"
|
|
|
|
|
# The Xcode generator does copies after rules, so the above trick
|
|
|
|
|
# won’t work, but its rules tolerate sources with SDKROOT-relative
|
|
|
|
|
# paths.
|
|
|
|
|
'sources': [
|
2014-09-30 13:11:04 -07:00
|
|
|
|
'$(SDKROOT)/usr/include/mach/exc.defs',
|
2014-12-11 11:27:18 -05:00
|
|
|
|
'$(SDKROOT)/usr/include/mach/mach_exc.defs',
|
2014-12-16 14:10:16 -05:00
|
|
|
|
'$(SDKROOT)/usr/include/mach/notify.defs',
|
2014-09-30 13:11:04 -07:00
|
|
|
|
],
|
2014-12-11 11:27:18 -05:00
|
|
|
|
}],
|
|
|
|
|
],
|
|
|
|
|
'rules': [
|
2014-09-30 13:11:04 -07:00
|
|
|
|
{
|
2014-12-11 11:27:18 -05:00
|
|
|
|
'rule_name': 'mig',
|
|
|
|
|
'extension': 'defs',
|
2014-09-30 13:11:04 -07:00
|
|
|
|
'inputs': [
|
|
|
|
|
'mach/mig.py',
|
|
|
|
|
],
|
|
|
|
|
'outputs': [
|
2014-12-11 11:27:18 -05:00
|
|
|
|
'<(INTERMEDIATE_DIR)/util/mach/<(RULE_INPUT_ROOT)User.c',
|
|
|
|
|
'<(INTERMEDIATE_DIR)/util/mach/<(RULE_INPUT_ROOT)Server.c',
|
|
|
|
|
'<(INTERMEDIATE_DIR)/util/mach/<(RULE_INPUT_ROOT).h',
|
|
|
|
|
'<(INTERMEDIATE_DIR)/util/mach/<(RULE_INPUT_ROOT)Server.h',
|
2014-09-30 13:11:04 -07:00
|
|
|
|
],
|
|
|
|
|
'action': [
|
2014-12-11 11:27:18 -05:00
|
|
|
|
'python', '<@(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)'
|
2014-09-30 13:11:04 -07:00
|
|
|
|
],
|
|
|
|
|
'process_outputs_as_sources': 1,
|
|
|
|
|
},
|
2014-09-05 13:27:06 -04:00
|
|
|
|
],
|
2014-09-30 13:11:04 -07:00
|
|
|
|
'link_settings': {
|
|
|
|
|
'libraries': [
|
|
|
|
|
'$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
|
|
|
|
|
'$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
|
|
|
|
|
'$(SDKROOT)/System/Library/Frameworks/IOKit.framework',
|
2015-03-12 14:00:38 -04:00
|
|
|
|
'$(SDKROOT)/usr/lib/libbsm.dylib',
|
2014-09-30 13:11:04 -07:00
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
}],
|
2015-01-26 13:31:35 -08:00
|
|
|
|
['OS=="win"', {
|
|
|
|
|
'link_settings': {
|
|
|
|
|
'libraries': [
|
2015-03-13 13:53:38 -04:00
|
|
|
|
'-lrpcrt4.lib',
|
2015-01-26 13:31:35 -08:00
|
|
|
|
'-lwinhttp.lib',
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
}],
|
2014-09-05 13:27:06 -04:00
|
|
|
|
],
|
2014-08-01 12:48:28 -04:00
|
|
|
|
},
|
2014-08-03 18:48:40 -04:00
|
|
|
|
{
|
2015-03-08 16:25:34 -04:00
|
|
|
|
'target_name': 'crashpad_util_test_lib',
|
2014-08-03 18:48:40 -04:00
|
|
|
|
'type': 'static_library',
|
|
|
|
|
'dependencies': [
|
2015-03-09 15:25:42 -04:00
|
|
|
|
'crashpad_util',
|
2015-03-08 16:25:34 -04:00
|
|
|
|
'../compat/compat.gyp:crashpad_compat',
|
2014-08-20 13:58:42 -04:00
|
|
|
|
'../third_party/gtest/gtest.gyp:gtest',
|
2015-03-09 15:25:42 -04:00
|
|
|
|
'../third_party/mini_chromium/mini_chromium.gyp:base',
|
2014-08-03 18:48:40 -04:00
|
|
|
|
],
|
|
|
|
|
'include_dirs': [
|
|
|
|
|
'..',
|
|
|
|
|
],
|
|
|
|
|
'sources': [
|
|
|
|
|
'test/errors.cc',
|
|
|
|
|
'test/errors.h',
|
2015-03-09 18:02:14 -04:00
|
|
|
|
'test/gtest_death_check.h',
|
2014-09-04 11:45:40 -04:00
|
|
|
|
'test/mac/dyld.h',
|
2014-08-03 18:48:40 -04:00
|
|
|
|
'test/mac/mach_errors.cc',
|
|
|
|
|
'test/mac/mach_errors.h',
|
2014-08-20 13:58:42 -04:00
|
|
|
|
'test/mac/mach_multiprocess.cc',
|
|
|
|
|
'test/mac/mach_multiprocess.h',
|
2014-08-26 17:10:19 -04:00
|
|
|
|
'test/multiprocess.h',
|
2014-09-03 18:24:29 -04:00
|
|
|
|
'test/multiprocess_exec.h',
|
2015-01-28 14:49:42 -08:00
|
|
|
|
'test/multiprocess_exec_posix.cc',
|
|
|
|
|
'test/multiprocess_exec_win.cc',
|
|
|
|
|
'test/multiprocess_posix.cc',
|
2015-03-09 15:13:13 -04:00
|
|
|
|
'test/paths.cc',
|
|
|
|
|
'test/paths.h',
|
|
|
|
|
'test/paths_mac.cc',
|
|
|
|
|
'test/paths_win.cc',
|
2015-01-02 13:51:47 -05:00
|
|
|
|
'test/scoped_temp_dir.cc',
|
|
|
|
|
'test/scoped_temp_dir.h',
|
|
|
|
|
'test/scoped_temp_dir_posix.cc',
|
2015-01-13 13:51:32 -08:00
|
|
|
|
'test/scoped_temp_dir_win.cc',
|
2015-03-20 15:45:54 -07:00
|
|
|
|
'test/thread.cc',
|
|
|
|
|
'test/thread.h',
|
|
|
|
|
'test/thread_posix.cc',
|
|
|
|
|
'test/thread_win.cc',
|
2014-08-03 18:48:40 -04:00
|
|
|
|
],
|
2014-10-02 18:32:33 -04:00
|
|
|
|
'conditions': [
|
|
|
|
|
['OS=="mac"', {
|
|
|
|
|
'link_settings': {
|
|
|
|
|
'libraries': [
|
|
|
|
|
'$(SDKROOT)/usr/lib/libbsm.dylib',
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
}],
|
|
|
|
|
],
|
2014-08-03 18:48:40 -04:00
|
|
|
|
},
|
2014-08-01 12:48:28 -04:00
|
|
|
|
{
|
2015-03-08 16:25:34 -04:00
|
|
|
|
'target_name': 'crashpad_util_test',
|
2014-08-01 12:48:28 -04:00
|
|
|
|
'type': 'executable',
|
|
|
|
|
'dependencies': [
|
2015-03-08 16:25:34 -04:00
|
|
|
|
'crashpad_util',
|
|
|
|
|
'crashpad_util_test_lib',
|
|
|
|
|
'crashpad_util_test_multiprocess_exec_test_child',
|
|
|
|
|
'../compat/compat.gyp:crashpad_compat',
|
2014-09-10 17:29:07 -04:00
|
|
|
|
'../third_party/gmock/gmock.gyp:gmock',
|
2015-03-09 15:25:42 -04:00
|
|
|
|
'../third_party/gmock/gmock.gyp:gmock_main',
|
2014-08-01 12:48:28 -04:00
|
|
|
|
'../third_party/gtest/gtest.gyp:gtest',
|
2015-03-09 15:25:42 -04:00
|
|
|
|
'../third_party/mini_chromium/mini_chromium.gyp:base',
|
2014-08-01 12:48:28 -04:00
|
|
|
|
],
|
|
|
|
|
'include_dirs': [
|
|
|
|
|
'..',
|
|
|
|
|
],
|
|
|
|
|
'sources': [
|
2015-03-20 15:45:54 -07:00
|
|
|
|
'file/file_io_test.cc',
|
2015-02-18 14:15:38 -05:00
|
|
|
|
'file/string_file_test.cc',
|
2014-08-28 13:47:28 -04:00
|
|
|
|
'mac/checked_mach_address_range_test.cc',
|
2014-09-22 13:11:40 -04:00
|
|
|
|
'mac/launchd_test.mm',
|
2014-08-15 22:33:14 -07:00
|
|
|
|
'mac/mac_util_test.mm',
|
2014-08-15 22:30:24 -07:00
|
|
|
|
'mac/service_management_test.mm',
|
2014-12-30 17:39:27 -05:00
|
|
|
|
'mac/xattr_test.cc',
|
2014-11-25 14:56:05 -05:00
|
|
|
|
'mach/child_port_handshake_test.cc',
|
2014-11-25 14:29:46 -05:00
|
|
|
|
'mach/child_port_server_test.cc',
|
2014-12-04 16:45:02 -05:00
|
|
|
|
'mach/composite_mach_message_server_test.cc',
|
2014-09-16 09:48:01 -04:00
|
|
|
|
'mach/exc_client_variants_test.cc',
|
2014-09-10 17:29:07 -04:00
|
|
|
|
'mach/exc_server_variants_test.cc',
|
2014-09-16 17:32:35 -04:00
|
|
|
|
'mach/exception_behaviors_test.cc',
|
2014-09-16 17:36:33 -04:00
|
|
|
|
'mach/exception_ports_test.cc',
|
2014-09-16 09:48:01 -04:00
|
|
|
|
'mach/mach_extensions_test.cc',
|
2014-09-08 21:06:34 -04:00
|
|
|
|
'mach/mach_message_server_test.cc',
|
2014-12-02 17:02:32 -05:00
|
|
|
|
'mach/mach_message_test.cc',
|
2014-12-16 14:10:16 -05:00
|
|
|
|
'mach/notify_server_test.cc',
|
2014-10-13 18:05:21 -04:00
|
|
|
|
'mach/scoped_task_suspend_test.cc',
|
2014-09-16 11:00:51 -04:00
|
|
|
|
'mach/symbolic_constants_mach_test.cc',
|
2014-08-03 18:48:40 -04:00
|
|
|
|
'mach/task_memory_test.cc',
|
2014-09-24 14:08:48 -04:00
|
|
|
|
'misc/clock_test.cc',
|
2014-08-14 09:51:26 -07:00
|
|
|
|
'misc/initialization_state_dcheck_test.cc',
|
|
|
|
|
'misc/initialization_state_test.cc',
|
2014-08-26 16:50:08 -04:00
|
|
|
|
'misc/scoped_forbid_return_test.cc',
|
2014-08-01 14:39:55 -04:00
|
|
|
|
'misc/uuid_test.cc',
|
2014-10-24 15:04:25 -04:00
|
|
|
|
'net/http_body_test.cc',
|
2014-10-29 19:13:24 -04:00
|
|
|
|
'net/http_body_test_util.cc',
|
|
|
|
|
'net/http_body_test_util.h',
|
|
|
|
|
'net/http_multipart_builder_test.cc',
|
2014-10-31 12:17:32 -04:00
|
|
|
|
'net/http_transport_test.cc',
|
2014-08-15 10:22:37 -07:00
|
|
|
|
'numeric/checked_range_test.cc',
|
2014-08-14 16:00:44 -07:00
|
|
|
|
'numeric/in_range_cast_test.cc',
|
2014-09-22 15:46:00 -04:00
|
|
|
|
'numeric/int128_test.cc',
|
Move some parts of ProcessReader (in snapshot) to ProcessInfo (in util).
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
2014-11-14 17:54:42 -05:00
|
|
|
|
'posix/process_info_test.cc',
|
2014-09-10 17:30:21 -04:00
|
|
|
|
'posix/symbolic_constants_posix_test.cc',
|
2014-09-10 15:30:11 -04:00
|
|
|
|
'stdlib/string_number_conversion_test.cc',
|
2014-08-01 14:39:55 -04:00
|
|
|
|
'stdlib/strlcpy_test.cc',
|
2014-08-28 14:38:27 -04:00
|
|
|
|
'stdlib/strnlen_test.cc',
|
2015-03-12 14:28:19 -04:00
|
|
|
|
'string/split_string_test.cc',
|
2014-09-24 13:32:31 -04:00
|
|
|
|
'synchronization/semaphore_test.cc',
|
2014-08-20 13:58:42 -04:00
|
|
|
|
'test/mac/mach_multiprocess_test.cc',
|
2014-09-03 18:24:29 -04:00
|
|
|
|
'test/multiprocess_exec_test.cc',
|
2015-01-28 14:49:42 -08:00
|
|
|
|
'test/multiprocess_posix_test.cc',
|
2015-03-09 15:13:13 -04:00
|
|
|
|
'test/paths_test.cc',
|
2015-01-02 13:51:47 -05:00
|
|
|
|
'test/scoped_temp_dir_test.cc',
|
2015-03-05 22:07:38 -08:00
|
|
|
|
'win/process_info_test.cc',
|
2015-02-20 11:35:04 -08:00
|
|
|
|
'win/time_test.cc',
|
2014-08-01 12:48:28 -04:00
|
|
|
|
],
|
2014-09-30 13:11:04 -07:00
|
|
|
|
'conditions': [
|
|
|
|
|
['OS=="mac"', {
|
|
|
|
|
'link_settings': {
|
|
|
|
|
'libraries': [
|
2014-10-02 18:32:33 -04:00
|
|
|
|
'$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
|
2014-09-30 13:11:04 -07:00
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
}],
|
2015-03-05 22:07:38 -08:00
|
|
|
|
['OS=="win"', {
|
|
|
|
|
'link_settings': {
|
|
|
|
|
'libraries': [
|
|
|
|
|
'-lrpcrt4.lib',
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
}],
|
2014-09-30 13:11:04 -07:00
|
|
|
|
],
|
2014-08-01 12:48:28 -04:00
|
|
|
|
},
|
2014-09-03 18:24:29 -04:00
|
|
|
|
{
|
2015-03-08 16:25:34 -04:00
|
|
|
|
'target_name': 'crashpad_util_test_multiprocess_exec_test_child',
|
2014-09-03 18:24:29 -04:00
|
|
|
|
'type': 'executable',
|
|
|
|
|
'sources': [
|
|
|
|
|
'test/multiprocess_exec_test_child.cc',
|
|
|
|
|
],
|
|
|
|
|
},
|
2014-08-01 12:48:28 -04:00
|
|
|
|
],
|
2015-03-05 22:07:38 -08:00
|
|
|
|
'conditions': [
|
|
|
|
|
['OS=="win"', {
|
|
|
|
|
'targets': [
|
|
|
|
|
{
|
2015-03-09 16:37:43 -07:00
|
|
|
|
'target_name': 'crashpad_util_test_process_info_test_child_x64',
|
2015-03-05 22:07:38 -08:00
|
|
|
|
'type': 'executable',
|
|
|
|
|
'sources': [
|
|
|
|
|
'win/process_info_test_child.cc',
|
|
|
|
|
],
|
2015-03-09 16:37:43 -07:00
|
|
|
|
'msvs_configuration_platform': 'x64',
|
2015-03-05 22:07:38 -08:00
|
|
|
|
# Set an unusually high load address to make sure that the main
|
|
|
|
|
# executable still appears as the first element in
|
|
|
|
|
# ProcessInfo::Modules().
|
|
|
|
|
'msvs_settings': {
|
|
|
|
|
'VCLinkerTool': {
|
|
|
|
|
'AdditionalOptions': [
|
|
|
|
|
'/BASE:0x78000000',
|
|
|
|
|
'/FIXED',
|
|
|
|
|
],
|
2015-03-09 16:37:43 -07:00
|
|
|
|
'TargetMachine': '17', # x64.
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
# Same as above, but explicitly x86 to test 64->32 access.
|
|
|
|
|
'target_name': 'crashpad_util_test_process_info_test_child_x86',
|
|
|
|
|
'type': 'executable',
|
|
|
|
|
'sources': [
|
|
|
|
|
'win/process_info_test_child.cc',
|
|
|
|
|
],
|
|
|
|
|
'msvs_configuration_platform': 'x86',
|
|
|
|
|
# Set an unusually high load address to make sure that the main
|
|
|
|
|
# executable still appears as the first element in
|
|
|
|
|
# ProcessInfo::Modules().
|
|
|
|
|
'msvs_settings': {
|
|
|
|
|
'VCLinkerTool': {
|
|
|
|
|
'AdditionalOptions': [
|
|
|
|
|
'/BASE:0x78000000',
|
|
|
|
|
'/FIXED',
|
|
|
|
|
],
|
|
|
|
|
'TargetMachine': '1', # x86.
|
2015-03-05 22:07:38 -08:00
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
}],
|
|
|
|
|
],
|
2014-08-01 12:48:28 -04:00
|
|
|
|
}
|