Bug 5213 - Threads: Avoid gethostbyname()
Threads: Avoid gethostbyname()
Status: NEW
Product: Samba 4.0
Classification: Unclassified
Component: Other
unspecified
Other Linux
: P3 normal
: ---
Assigned To: Andrew Bartlett
Andrew Bartlett
:
Depends on:
Blocks: 6358
  Show dependency treegraph
 
Reported: 2008-01-19 11:01 UTC by Jelmer Vernooij
Modified: 2010-01-09 10:43 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jelmer Vernooij 2008-01-19 11:01:57 UTC
We still use the thread-unsafe gethostbyname() function in several places. We should be using 
gethostbyname_r or getaddrinfo() instead.

lib/replace/getaddrinfo.c:	return canon_name_from_hostent(gethostbyname(name), perr);
lib/replace/getaddrinfo.c:	hp = gethostbyname(node);
lib/socket/socket_ip.c:	he = gethostbyname2(name, PF_INET6);
lib/util/system.c:		return(gethostbyname(name));
lib/util/system.c:		return(gethostbyname(name));
lib/util/system.c:		return(gethostbyname(name));
lib/util/system.c:	return(gethostbyname(query));
lib/util/system.c:	return(gethostbyname(name));