[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getdomainname: fix several problems
From: |
Simon Josefsson |
Subject: |
Re: getdomainname: fix several problems |
Date: |
Sun, 28 Nov 2010 20:58:56 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) |
Bruno Haible <address@hidden> writes:
> Tested with a unit test on glibc, MacOS X 10.5, AIX 5.1, OSF/1 5.1, Solaris
> 10,
> mingw. OK to commit?
Thank you! Seems fine to me.
Paul Eggert <address@hidden> writes:
> On 11/28/2010 08:56 AM, Bruno Haible wrote:
>> So what the gnulib replacement was doing, was to return a
>> dummy string instead of calling the system's function. It is better
>> to call the system's function.
>
> <http://www.sun.com/software/solaris/programs/abi/appcert_faq.xml#q18>
> says that libnsl's getdomainname is a private interface, which (presumably)
> means that gnulib should not use it. It says that for the NIS domain
> (which is what the code currently says it wants) the code should use
> sysinfo(SI_SRPC_DOMAIN).
>
> But before we get too deeply into this, who needs getdomainname and
> why? If the caller wants the DNS domain, they could well be barking
> up the wrong tree here.
I call getdomainname in Shishi to find the name of the default Kerberos
realm if the configuration file did not specify one. It is typically no
worse than failing, and can be correct in some environments. However,
maybe this is a bad idea, and it is actually more robust to fail in this
situation.
/Simon
Re: getdomainname: fix several problems,
Simon Josefsson <=