diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-07-01 03:11:18 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-07-01 10:11:49 +0000 |
commit | 0cf54e78275f3e75cc3c40457299d826d9eb5384 (patch) | |
tree | 218ea3d9abec344a702932ee6ecf4e7173e3e450 /tfshark.c | |
parent | 94853926874b7d33a3e1f215dfa632a484fb0352 (diff) | |
download | wireshark-0cf54e78275f3e75cc3c40457299d826d9eb5384.tar.gz |
Drop privileges even earlier.
Do it at the same point at which Wireshark does so. Do some other
things in the same order as well.
Change-Id: I2925366d49d14271ceffa1a938b5e3450337c772
Reviewed-on: https://code.wireshark.org/review/2743
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'tfshark.c')
-rw-r--r-- | tfshark.c | 36 |
1 files changed, 18 insertions, 18 deletions
@@ -796,22 +796,6 @@ main(int argc, char *argv[]) cmdarg_err_init(failure_message, failure_message_cont); - /* Assemble the compile-time version information string */ - comp_info_str = g_string_new("Compiled "); - get_compiled_version_info(comp_info_str, NULL, epan_get_compiled_version_info); - - /* Assemble the run-time version information string */ - runtime_info_str = g_string_new("Running "); - get_runtime_version_info(runtime_info_str, NULL); - - /* Add it to the information to be reported on a crash. */ - ws_add_crash_info("TFShark %s\n" - "\n" - "%s" - "\n" - "%s", - get_ws_vcs_version_info(), comp_info_str->str, runtime_info_str->str); - #ifdef _WIN32 arg_list_utf_16to8(argc, argv); create_app_running_mutex(); @@ -838,6 +822,24 @@ main(int argc, char *argv[]) init_progfile_dir_error); } + initialize_funnel_ops(); + + /* Assemble the compile-time version information string */ + comp_info_str = g_string_new("Compiled "); + get_compiled_version_info(comp_info_str, NULL, epan_get_compiled_version_info); + + /* Assemble the run-time version information string */ + runtime_info_str = g_string_new("Running "); + get_runtime_version_info(runtime_info_str, NULL); + + /* Add it to the information to be reported on a crash. */ + ws_add_crash_info("TFShark %s\n" + "\n" + "%s" + "\n" + "%s", + get_ws_vcs_version_info(), comp_info_str->str, runtime_info_str->str); + /* * In order to have the -X opts assigned before the wslua machine starts * we need to call getopts before epan_init() gets called. @@ -909,8 +911,6 @@ main(int argc, char *argv[]) (GLogLevelFlags)log_flags, tfshark_log_handler, NULL /* user_data */); - initialize_funnel_ops(); - init_report_err(failure_message, open_failure_message, read_failure_message, write_failure_message); |