Bug 5214 - Threads: Avoid gethostbyaddr()
Summary: Threads: Avoid gethostbyaddr()
Status: NEW
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: Other Linux
: P3 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Andrew Bartlett
URL:
Keywords:
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().