Re: [libvirt] [PATCH] syntax-check: prohibit all new uses of gethostby* functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 11, 2008 at 11:55:08AM +0100, Jim Meyering wrote:
> "Daniel P. Berrange" <berrange@xxxxxxxxxx> wrote:
> > On Wed, Dec 10, 2008 at 07:33:17PM -0800, David Lutterkort wrote:
> >> The attached patch makes virConnectGetHostname try a little harder to get a
> >> FQDN on systems where gethostname only returns a short name without a
> >> domain (which is pretty useless). The behavior is equivalent to 'hostname
> >> --fqdn'.
[...]
> > Actually, gethostbyname should never be used in any modern code as it is
> > not thread safe. Instead use getaddrinfo() and  the AI_CANONNAME flag
> 
> Good point.
> Yet another reason not to use gethostbyname.
> I think it's time to make the prohibition official.
> Here's a patch to do that:

  +1 to both patches,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]