[Libreoffice] [PATCH] Replace command domainname by getdomainname() on Unix

Arnaud Versini arnaud.versini at gmail.com
Sun Nov 13 05:30:40 PST 2011


there is this portion of code in _osl_getFullQualifiedDomainName :

    if (nLengthOfDomainName == 0)
    {
        sal_Char pDomainNameBuffer[ DOMAINNAME_LENGTH ];

        pDomainNameBuffer[0] = '\0';

        if (_osl_getDomainName (pDomainNameBuffer, DOMAINNAME_LENGTH))
        {
            pDomainName = strdup (pDomainNameBuffer);
            nLengthOfDomainName = strlen (pDomainName);
        }
    }



2011/11/13 Lionel Elie Mamane <lionel at mamane.lu>

> On Sun, Nov 13, 2011 at 12:46:06PM +0200, Noel Grandin wrote:
>
> > GetDomainName is only used by
> >   GetYPDomainName
> > in the same file
>
> > which in turn is only used by
> >  const rtl::OUString& SubstitutePathVariables_Impl::GetYPDomainName()
> > in
> >   /core/framework/source/services/substitutepathvars.cxx
>
> > which in turn is only used by
> >   bool SubstitutePathVariables_Impl::FilterRuleSet( const
> > SubstituteRuleVector& aRuleSet, SubstituteRule& aActiveRule )
> > in the same file.
>
> > and that particular codepath in that method is only referenced when the
> >   enum EnvironmentType {
> >       ET_YPDOMAIN
> > constant is used.
>
> This all suggests that it *is* the nis domain that should be returned
> there, not the DNS domain.
>
> On Sun, Nov 13, 2011 at 11:58:51AM +0100, Arnaud Versini wrote:
>
> > This function is also used in _osl_getFullQualifiedDomainName,
>
> No, it does not. Not in master, not in libreoffice-3-4.
> osl_getFullQualifiedDomainName uses gethostbyname_r.
>
> --
> Lionel
>



-- 
Arnaud Versini
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20111113/0b4d87e6/attachment.htm>


More information about the LibreOffice mailing list