Add missing initialization calls.
authorGuy Harris <guy@alum.mit.edu>
Thu, 3 Mar 2016 21:35:40 +0000 (13:35 -0800)
committerGuy Harris <guy@alum.mit.edu>
Thu, 3 Mar 2016 21:36:20 +0000 (21:36 +0000)
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>
mergecap.c

index cfcc1a6d73395c83a66c73ff78f47fd99775d918..56258253edb199c29a5cef29a4b57d322fa0cdd6 100644 (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. */