http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2070
Summary: Inability to read local dfilter_macros file in one
exists in datadir
Product: Wireshark
Version: SVN
Platform: PC
OS/Version: All
Status: NEW
Severity: Normal
Priority: Low
Component: Wireshark
AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
ReportedBy: jyoung@xxxxxxx
Build Information:
Version 0.99.7pre2 (SVN Rev 23672)
Copyright 1998-2007 Gerald Combs <gerald@xxxxxxxxxxxxx> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compiled with GTK+ 2.12.1, with GLib 2.14.3, with WinPcap (version unknown),
with libz 1.2.3, with libpcre 6.4, with SMI 0.4.5, with ADNS, with Lua 5.1,
with
GnuTLS 1.6.1, with Gcrypt 1.2.3, with MIT Kerberos, with PortAudio PortAudio
V19-devel, with AirPcap.
Running on Windows XP Service Pack 1, build 2600, with WinPcap version 4.0.2
(packet.dll version 4.0.0.1040), based on libpcap version 0.9.5, without
AirPcap.
Built using Microsoft Visual C++ 6.0 build 8804
Wireshark is Open Source Software released under the GNU General Public
License.
Check the man page and http://www.wireshark.org for more information.
--
This bug concerns the procedure uat_get_actual_filename() defined in epan/uat.c
The presence of the filenames "k12_protos", "sccp_users", "snmp_users",
"user_dlts", or "dfilter_macros" in the "Global configuration" folder will
prevent a Wireshark user from being able to read the same filename from the
"Personal configuration" folder.
Oddly the user WILL be able to edit and save new entries (for example using the
"Display Filter Macros" window), but any saved files will be written to the
"Personal configuration" folder. But the updated personal files will be
inaccessible to the Wireshark user upon the next invocation if the same
filename exists the "Global configuration" folder.
Workaround: delete the file from "datadir" ("Global configuration" folder)
A proposed patch will be uploaded shortly.
Details regarding the problem:
Upon startup of Wireshark, for each of the file names listed above a procedure
called uat_get_actual_filename() is invoked from uat_load() via uat_load_all()
via init_prefs() via read_prefs() . With each of these initial calls to
uat_get_actual_filename() the "for_writing" flag is set to FALSE (which makes
sense, since the data file is simply being opened for read).
But when the "for_writing" flag is set to FALSE a bug (feature?) in
uat_get_actual_filename() ignores an existing file in the userdir (a.k.a. the
"Personal configuration" folder) in favor of an existing file in datadir
(a.k.a. the "Global configuration" folder). So if a file already exists in the
datadir folder then its contents will be read instead of any copy in the
userdir older.
Note: This problem was found because an empty copy of the "dfilter_macros" file
is currently installed by SVN in the build directory root. When one runs
Wireshark from the build directory the "Global configuration" folder is set to
the build directory root!
--
Configure bugmail: http://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.