Ethereal-dev: Re: [Ethereal-dev] Crashes on Win98 and WinME fixed

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Lars Roland <lars.roland@xxxxxxx>
Date: Fri, 07 Jan 2005 13:48:03 +0100
Guy Harris schrieb:
Lars Roland wrote:

A lot of people recently reported crashes of Ethereal 0.10.8 on Win98 and WinME at startup.
This issue is solved now.


On Windows 95/98/Me, there's apparently a hosts file, but it's in c:\windows\hosts. I've checked in a change so that if SYSTEMROOT isn't set, it tries reading c:\windows\hosts - and also tries c:\winnt\system32\drivers\etc\hosts and c:\windows\system32\drivers\etc\hosts, in case SYSTEMROOT wasn't set on NT 4.0/2K/XP/Server2K3.

Why do we try to read the hosts file here (Just before initializing ADNS). Do we hand over anything to ADNS? If we just use the hosts file as an additional source for name resolution, shouldn't we read the hosts file anyway, independent of having ADNS or not?


Is WINDIR set on 95/98/Me?
It is set on 98 and ME, I don't know, if it is set on Win95.
BTW, ADNS does *not* support Win95. Thus Ethereal doesn't support Win95 if built with ADNS, right?
If so, should it be checking there?
Yes, I think it is better to use WINDIR than fixed entries with fixed drive letters.
If so, should it use WINDIR rather than SYSTEMROOT?
I don't see any difference between them. I would use WINDIR instead of SYSTEMROOT.

In either case, should it try both %WINDIR%\hosts and %WINDIR%\system32\drivers\etc\hosts, to handle both 95/98/Me and NT4/2K/XP/Server2K3, or should it base that on whether it's Windows OT (95/98/Me) or NT (NT4/2K/XP/Server2K3)?
I guess it is better to try both on any Windows.

Or is there some better way of getting the pathname of the hosts file?

I don't know of anything better. :(


Should we just punt, rather than trying well-known paths, if {WINDIR,SYSTEMROOT} isn't set?
I would skip fixed paths with fixed drive letters.

Regards,
Lars