[279] in Moira
Undefined variable __res
daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Wed Mar 6 12:02:40 1991
Date: Wed, 6 Mar 91 12:01:42 -0500
From: Mark Rosenstein <mar@MIT.EDU>
To: alan@essex.ac.uk
Cc: bug-moira@ATHENA.MIT.EDU
In-Reply-To: Stanier A's message of Tue, 5 Mar 91 15:24:30 GMT <7645.9103051524@sersun2.essex.ac.uk>
The hostname canonicalization routine references the name resolver
internal state to find out what domain you are in. Your system must
have a different resolver on your system if this is failing. You
could either change this code to get the domain in a way that will
work on your system, or simply remove the lines
if (!has_dot) {
(void) sprintf(tbuf, "%s.%s", host, _res.defdname);
free(host); ^^^^^^^^^^^^^
host = strsave(tbuf); ^
} ^
from the source in which case a name which does not resolve will not
get a domain tacked on to it. This is done because we often will
enter a new machine in moira before it has been registered with the
nameservers here, and it enables us to just type the local part of the
name (i.e. "M4-162-2") instead of the full name (i.e. "M4-167-2.MIT.EDU").
I'll try to find a more portable way to do this for the next release
of moira.
-Mark