diff options
author | Guy Harris <guy@alum.mit.edu> | 2007-05-21 20:31:45 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2007-05-21 20:31:45 +0000 |
commit | a3d3282e64d9d2f82db472d6d422aca3d965b4b7 (patch) | |
tree | ca1efe51008ffcf0243cc83d30bca9d639a7084a /tshark.c | |
parent | 4a22b30c362d68df3ebd632769cf4823699c3ed2 (diff) | |
download | wireshark-a3d3282e64d9d2f82db472d6d422aca3d965b4b7.tar.gz wireshark-a3d3282e64d9d2f82db472d6d422aca3d965b4b7.tar.bz2 wireshark-a3d3282e64d9d2f82db472d6d422aca3d965b4b7.zip |
Have init_progfile_dir() also check whether
WIRESHARK_RUN_FROM_BUILD_DIRECTORY is set and, if so and we weren't run
with special privileges, set the running_in_build_directory_flag. Have
it do the same if it finds ".libs" in the pathname of the program and we
weren't run with special privileges, as that means it was probably run
from the libtool wrapper script and presumably thus isn't an installed
binary.
This means that get_credential_info() has to be called before
init_progfile_dir().
Clean up some indentation.
svn path=/trunk/; revision=21866
Diffstat (limited to 'tshark.c')
-rw-r--r-- | tshark.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -721,6 +721,11 @@ main(int argc, char *argv[]) static const char optstring[] = OPTSTRING_INIT OPTSTRING_WIN32; /* + * Get credential information for later use. + */ + get_credential_info(); + + /* * Attempt to get the pathname of the executable file. */ init_progfile_dir_error = init_progfile_dir(argv[0]); @@ -730,11 +735,6 @@ main(int argc, char *argv[]) } /* - * Get credential information for later use. - */ - get_credential_info(); - - /* * Now attempt to get the pathname of the plugins. */ init_plugin_dir(); |