Bug 5214 - Threads: Avoid gethostbyaddr()
Threads: Avoid gethostbyaddr()
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:03 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:03:27 UTC
We still use the thread-unsafe gethostbyaddr():

lib/socket/socket_ip.c:	he = gethostbyaddr((char *)&peer_addr.sin_addr, sizeof(peer_addr.sin_addr), AF_INET);
lib/socket/socket_ip.c:	he = gethostbyaddr((char *)&peer_addr.sin6_addr, sizeof(peer_addr.sin6_addr), AF_INET6)

Instead, we should be using getnaemeinfo() or gethostbyaddr_r().