diff options
author | morriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7> | 2008-03-16 00:32:12 +0000 |
---|---|---|
committer | morriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7> | 2008-03-16 00:32:12 +0000 |
commit | 9088d2f02ffdcbe1912f1197c29c1d2eece65b46 (patch) | |
tree | 76f343eeada0f23481b0d12c6f83c5395b7aa8a6 /editcap.c | |
parent | 7dced968e738f8d3ee4fa36d558b611866b23876 (diff) |
Have started_with_special_privs() assert out if get_credential_info() was not
previously called. This prevents the function from always returning TRUE in
programs that hadn't called get_credential_info().
Call get_credential_info() in the programs that should have been.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24648 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'editcap.c')
-rw-r--r-- | editcap.c | 20 |
1 files changed, 15 insertions, 5 deletions
@@ -297,7 +297,8 @@ is_duplicate(guint8* fd, guint32 len) { return FALSE; } -static void usage(void) +static void +usage(void) { fprintf(stderr, "Editcap %s" #ifdef SVNVERSION @@ -342,7 +343,8 @@ static void usage(void) fprintf(stderr, "\n"); } -static void list_capture_types(void) { +static void +list_capture_types(void) { int i; fprintf(stderr, "editcap: The available capture file types for \"F\":\n"); @@ -353,7 +355,8 @@ static void list_capture_types(void) { } } -static void list_encap_types(void) { +static void +list_encap_types(void) { int i; const char *string; @@ -374,8 +377,8 @@ failure_message(const char *msg_format, va_list ap) fprintf(stderr, "\n"); } -int main(int argc, char *argv[]) - +int +main(int argc, char *argv[]) { wtap *wth; int i, j, err; @@ -400,7 +403,14 @@ int main(int argc, char *argv[]) gboolean check_ts; #ifdef HAVE_PLUGINS char* init_progfile_dir_error; +#endif + /* + * Get credential information for later use. + */ + get_credential_info(); + +#ifdef HAVE_PLUGINS /* Register wiretap plugins */ if ((init_progfile_dir_error = init_progfile_dir(argv[0]))) { g_warning("capinfos: init_progfile_dir(): %s", init_progfile_dir_error); |