Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 9 Jun 2022 20:42:28 +0200
From: Hans Harder <hans@...as.org>
To: musl@...ts.openwall.com
Subject: hostname is using a case sensitive search in function name_from_hosts

Hi,
I discovered that the function name_from_hosts parses the /etc/hosts
file and does a case sensitive search for a name.
Sometimes I encounter mixed upper and lowercase hostnames in a /etc/hosts file.
It would be easier if the function searches for the name in a case
insensitive way....

By changing line 68  in src/network/lookup_name.c
       for(p=line+1; (p=strstr(p, name)) &&
to:
       for(p=line+1; (p=strcasestr(p, name)) &&

That would resolve the problem.

Hans

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.