diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2008-03-16 00:32:12 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2008-03-16 00:32:12 +0000 |
commit | d951728e6bf58815e1358611b2f1614d000986c9 (patch) | |
tree | 76f343eeada0f23481b0d12c6f83c5395b7aa8a6 /capinfos.c | |
parent | 6367e7c05456f87f6632993871a854bb08091562 (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.
svn path=/trunk/; revision=24648
Diffstat (limited to 'capinfos.c')
-rw-r--r-- | capinfos.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/capinfos.c b/capinfos.c index 321a19172c..0fc337bcb0 100644 --- a/capinfos.c +++ b/capinfos.c @@ -212,7 +212,8 @@ process_cap_file(wtap *wth, const char *filename) return 0; } -static void usage(gboolean is_error) +static void +usage(gboolean is_error) { FILE *output; @@ -271,7 +272,8 @@ failure_message(const char *msg_format, va_list ap) } -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { wtap *wth; int err; @@ -282,7 +284,14 @@ int main(int argc, char *argv[]) int status = 0; #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]))) { |