Mailinglist Archive: opensuse-bugs (19813 mails)

< Previous Next >
[Bug 389818] New: OpenOffice uses gethostbyname to resolve host name
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Tue, 13 May 2008 08:15:31 -0600 (MDT)
  • Message-id: <bug-389818-21960@xxxxxxxxxxxxxxxxxxxxxxxxx/>

Summary: OpenOffice uses gethostbyname to resolve host name
Product: openSUSE 11.0
Version: Beta 1
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
AssignedTo: pmladek@xxxxxxxxxx
ReportedBy: lnussel@xxxxxxxxxx
QAContact: qa@xxxxxxx
CC: mmeeks@xxxxxxxxxx, captain.magnus@xxxxxxxxxxxx
Found By: ---

In sal/osl/unx/socket.c, osl_psz_getLocalHostname() OpenOffice calls
gethostbyname() to resolve the systems' hostname with DNS. That
causes DNS timeouts on systems where the hostname is not resolvable
such as laptops.

OpenOffice only does the DNS lookup if the hostname doesn't already
contain a dot. The assumption that a dot means the hostname is fully
qualified is wrong though. A hostname with a dot could just as well
mean that the system is in a sub domain (see also ndots in

If DNS resolving fails OpenOffice just uses the unqualified name so
unavailability of DNS is not detrimental. Is there any reason to try
DNS in the first place after all? If osl_psz_getLocalHostname() just
used gethostname() the DNS timeout could be avoided.

On previous openSUSE releases OpenOffice likely didn't use the
official FQDN but something like '' due to entries
in /etc/hosts anyways.

See also bug 383336 for a lengthy discussion about unecessary dns timeouts.

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >