mirror of
https://github.com/nmap/nmap.git
synced 2025-12-20 14:39:02 +00:00
Revert r32397, r32398, r32399 (tempnam to mkstemp).
I had intended the unlink to appy only to unix domain sockets, but it was being called for every kind of local address. http://seclists.org/nmap-dev/2013/q3/647
This commit is contained in:
@@ -67,7 +67,6 @@
|
||||
|
||||
|
||||
static int mksock_bind_addr(mspool *ms, msiod *iod) {
|
||||
const char *path;
|
||||
int rc;
|
||||
int one = 1;
|
||||
|
||||
@@ -79,15 +78,13 @@ static int mksock_bind_addr(mspool *ms, msiod *iod) {
|
||||
socket_strerror(err), err);
|
||||
}
|
||||
|
||||
path = get_localaddr_string(iod);
|
||||
unlink(path);
|
||||
nsock_log_info(ms, "Binding to %s (IOD #%li)", path, iod->id);
|
||||
nsock_log_info(ms, "Binding to %s (IOD #%li)", get_localaddr_string(iod), iod->id);
|
||||
rc = bind(iod->sd, (struct sockaddr *)&iod->local, (int) iod->locallen);
|
||||
if (rc == -1) {
|
||||
int err = socket_errno();
|
||||
|
||||
nsock_log_error(ms, "Bind to %s failed (IOD #%li): %s (%d)",
|
||||
path, iod->id,
|
||||
get_localaddr_string(iod), iod->id,
|
||||
socket_strerror(err), err);
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user