[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: Problem with gethostbyaddr while trying to run commercial app



Both hosts.conf and nsswitch.conf is configured to use the hosts file for
lookup first.
The hosts file is setup e.g.
127.0.0.1	hostname localhost
10.10.10.11	hostname
where hostname above is not the FQDN.

I will have a look at using the FQDN.

Funny thing is that it seems that the application tries to use the hostname
(not FQDN) in
a call to gethostbyaddr.  Isn't gethostbyaddr for getting the hostname to
get the IP?

-----Original Message-----
From: Derrick 'dman' Hudson [mailto:dman@dman.ddts.net]
Sent: Thursday, June 27, 2002 11:40 AM
To: debian-user@lists.debian.org
Subject: Re: Problem with gethostbyaddr while trying to run commercial
app


On Thu, Jun 27, 2002 at 09:36:30AM +0800, alwyn@smart.com.ph wrote:
| Hi,
| 
| I am trying to get a commercial application which was originally intended
| for Redhat 6.2 to work on Woody.
| 
| It complines that gethostbyaddr() cannot find the local machine's
hostname.
| The box is set up correctly and from
| strace I can see that it looks in the right files and actually reads the
| data.

Which files would that be?  Which data?

If the app calls gethostbyaddr() and passes "127.0.0.1" as the
address, the function returns the first entry on the 127.0.0.1 line
from /etc/hosts.  Put your FQDN there.  exim and sendmail also
experience this quirk.

-D

-- 

"He is no fool who gives up what he cannot keep to gain what he cannot
lose."
        --Jim Elliot
 
http://dman.ddts.net/~dman/


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.371 / Virus Database: 206 - Release Date: 6/13/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.371 / Virus Database: 206 - Release Date: 6/13/2002
 



______________________________________ 
The information transmitted through this mail is intended solely for the
addressee and may be legally privileged. Any disclosure, copying,
dissemination or any action taken or omitted, to be taken in reliance on it,
by persons or entities other than the intended recipient is prohibited. 
Smart Communications, Inc.
http://www.smart.com.ph



-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: