Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163564559
D47870.id147369.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D47870.id147369.diff
View Options
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -965,8 +965,6 @@
if (t != NULL &&
(inp->inp_socket->so_type != SOCK_STREAM ||
in_nullhost(t->inp_faddr)) &&
- (!in_nullhost(laddr) ||
- !in_nullhost(t->inp_laddr)) &&
(inp->inp_cred->cr_uid != t->inp_cred->cr_uid))
return (EADDRINUSE);
}
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c
--- a/sys/netinet6/in6_pcb.c
+++ b/sys/netinet6/in6_pcb.c
@@ -244,8 +244,6 @@
if (t != NULL &&
(inp->inp_socket->so_type != SOCK_STREAM ||
IN6_IS_ADDR_UNSPECIFIED(&t->in6p_faddr)) &&
- (!IN6_IS_ADDR_UNSPECIFIED(laddr) ||
- !IN6_IS_ADDR_UNSPECIFIED(&t->in6p_laddr)) &&
(inp->inp_cred->cr_uid != t->inp_cred->cr_uid))
return (EADDRINUSE);
diff --git a/tests/sys/netinet/socket_afinet.c b/tests/sys/netinet/socket_afinet.c
--- a/tests/sys/netinet/socket_afinet.c
+++ b/tests/sys/netinet/socket_afinet.c
@@ -483,16 +483,8 @@
/*
* Multi-binding is only allowed when both
* sockets have the same owner.
- *
- * XXX-MJ we for some reason permit this when
- * binding to the unspecified address, but I
- * don't think that's right
*/
- if (flags[flagi] && opts[opti] != 0 &&
- opts[opti] != SO_REUSEADDR && opti == optj)
- ATF_REQUIRE(res);
- else
- ATF_REQUIRE(!res);
+ ATF_REQUIRE(!res);
}
ATF_REQUIRE(close(s) == 0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jul 25, 1:18 PM (21 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35474646
Default Alt Text
D47870.id147369.diff (1 KB)
Attached To
Mode
D47870: inpcb: Further restrict binding to a port owned by a different UID
Attached
Detach File
Event Timeline
Log In to Comment