patches for easier mirroring, to eliminate a special copy, to make www.freebsd.org/security a full copy of security.freebsd.org and be eventually be the same. For now files are just sitting there. The symlinks are missing. Discussed on: www (repository location) Discussed with: simon (so)
33 lines
915 B
Diff
33 lines
915 B
Diff
Index: sys/compat/linux/linux_socket.c
|
|
===================================================================
|
|
--- sys/compat/linux/linux_socket.c (revision 225919)
|
|
+++ sys/compat/linux/linux_socket.c (working copy)
|
|
@@ -104,6 +104,7 @@
|
|
int oldv6size;
|
|
struct sockaddr_in6 *sin6;
|
|
#endif
|
|
+ int namelen;
|
|
|
|
if (*osalen < 2 || *osalen > UCHAR_MAX || !osa)
|
|
return (EINVAL);
|
|
@@ -166,6 +167,20 @@
|
|
}
|
|
}
|
|
|
|
+ if ((bdom == AF_LOCAL) && (*osalen > sizeof(struct sockaddr_un))) {
|
|
+ for (namelen = 0;
|
|
+ namelen < *osalen - offsetof(struct sockaddr_un, sun_path);
|
|
+ namelen++)
|
|
+ if (!((struct sockaddr_un *)kosa)->sun_path[namelen])
|
|
+ break;
|
|
+ if (namelen + offsetof(struct sockaddr_un, sun_path) >
|
|
+ sizeof(struct sockaddr_un)) {
|
|
+ error = EINVAL;
|
|
+ goto out;
|
|
+ }
|
|
+ alloclen = sizeof(struct sockaddr_un);
|
|
+ }
|
|
+
|
|
sa = (struct sockaddr *) kosa;
|
|
sa->sa_family = bdom;
|
|
sa->sa_len = alloclen;
|