Add missing initialization calls.

Do the same thing editcap does; we need to know, for example, whether we
were invoked with elevated privileges, so we know whether to pay
attention to environment variables when loading plugins.

Fix program name, and add a comment from editcap, while we're at it.

Change-Id: Ia092331de129d86783a2600be21cff746d4ed5e3
Reviewed-on: https://code.wireshark.org/review/14334
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2016-03-03 13:35:40 -08:00
parent 894804acd0
commit 5ec5da3f68
1 changed files with 8 additions and 1 deletions

View File

@ -324,9 +324,16 @@ main(int argc, char *argv[])
"%s",
get_ws_vcs_version_info(), comp_info_str->str, runtime_info_str->str);
/*
* Get credential information for later use.
*/
init_process_policies();
init_open_routines();
#ifdef HAVE_PLUGINS
/* Register wiretap plugins */
if ((init_progfile_dir_error = init_progfile_dir(argv[0], main))) {
g_warning("captype: init_progfile_dir(): %s", init_progfile_dir_error);
g_warning("mergecap: init_progfile_dir(): %s", init_progfile_dir_error);
g_free(init_progfile_dir_error);
} else {
/* Register all the plugin types we have. */