Article View: news.software.readers
Article #57931Re: [slrn] slrn can't deduce my fqdn, so I can't get customized MsgIDs
From: Daniel Price
Date: Fri, 11 Feb 2000 00:00
Date: Fri, 11 Feb 2000 00:00
56 lines
2980 bytes
2980 bytes
On 11 Feb 2000 13:25:14 GMT, Jens Wahnes <jewa@gmx.net> wrote:
>Daniel Price wrote:
>
>> I use a tracing tool available in Solaris to see what library calls are being
>> made at this point in the code:
>[...]
>> Now what? slrn_get_user_info() checks to see if "xanadu" is fully qualified.
>> Of course it isn't.
>> At this point, there is no possible way to set posting_host-- the rest of the
>> function drives on and ignores posting_host.
>
>Looking at your email address, _you_ are certainly the Solaris expert. :-)
Thanks (I think).
>So I wonder why gethostbyname doesn't return the FQDN but only the host
>name? I never had access to a Solaris system so I don't know if this
>is a generic problem there, but maybe the FQDN just isn't properly set?
>slrn does get the correct FQDN on all systems I've tried so far, which
>were Linux, AIX, and Windows.
Today I reproduced this problem on a machine running linux as well-- I
think the invariant in the problem is *NIS*. If you get your naming
data from NIS, then you don't get FQ names. On a machine outside of
Sun, which resolves names from DNS, the name was fully qualified.
So, I would call this a bug-- slrn doesn't play nice with systems
resolving hosts via NIS.
One idea for a fallback algorithm is to call
sysinfo(SI_SRPC_DOMAIN, buf, 256);
On my host, that returns sunsoft.eng.sun.com in buf, which is close
enough ("sunsoft" is an artifact).
This works on Solaris; I'm not sure what the linux equivalent is, since
inexplicably linux seems to implement a sysinfo(2) system call that has
a completely different interface and provides different data items.
Sigh. However, there is a domainname[65] in the utsname structure.
I have no idea about other OS variants. According to the
sys/systeminfo.h header file, these SI_ constants were assigned by Unix
International, so this ought to be at least vaguely portable....
Any thoughts?
-dp
--
Daniel Price - Solaris I/O - dp@eng.sun.com
Expressed in this posting are my opinions. They are in no way related to
opinions held by my employer, Sun Microsystems. Statements on Sun products
included here are not gospel and may be fiction rather than truth.
Technical Details
Message-ID:
<88261v$2p6$1@engnews2.Eng.Sun.COM>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailReferences:
<880j4i$bev$1@engnews2.Eng.Sun.COM> <slrn8a83dq.4b.jewa@message-id.wahnes-world.de>Show Full Headers
Complete Article Headers
Message-ID: <88261v$2p6$1@engnews2.Eng.Sun.COM> Subject: Re: [slrn] slrn can't deduce my fqdn, so I can't get customized MsgIDs Date: Fri, 11 Feb 2000 00:00:00 +0000 From: dp@xanadu.eng.sun.com (Daniel Price) References: <880j4i$bev$1@engnews2.Eng.Sun.COM> <slrn8a83dq.4b.jewa@message-id.wahnes-world.de> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 584761333 Organization: Sun Microsystems Inc., Mountain View, CA User-Agent: slrn/0.9.6.2 (SunOS) Reply-To: dp@xanadu.eng.sun.com Newsgroups: news.software.readers