Module Name: src
Committed By: snj
Date: Sat Oct 11 16:16:44 UTC 2014
Modified Files:
src/sys/kern [netbsd-7]: uipc_usrreq.c
Log Message:
Pull up following revision(s) (requested by taca in ticket #132):
sys/kern/uipc_usrreq.c: revision 1.172
Make behavior of getsockname(2) (and maybe getpeername(2)) as the same as
NetBSD 6.1_STABLE and other operating system (OS X 10.9.5).
* sa_len of sockaddr_un strucrure is always set to sizeof(sun_path).
* pathname stored in sun_path is alwasys '\0' terminated (except length
of sun_path is sizeof(sun_path)?).
Should be fix PR kern/49247, runtime problem of lmtp service of dovecot2 on
NetBSD current and NetBSD 7.0_BETA.
To generate a diff of this commit:
cvs rdiff -u -r1.169 -r1.169.2.1 src/sys/kern/uipc_usrreq.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/uipc_usrreq.c
diff -u src/sys/kern/uipc_usrreq.c:1.169 src/sys/kern/uipc_usrreq.c:1.169.2.1
--- src/sys/kern/uipc_usrreq.c:1.169 Sat Aug 9 05:33:00 2014
+++ src/sys/kern/uipc_usrreq.c Sat Oct 11 16:16:44 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_usrreq.c,v 1.169 2014/08/09 05:33:00 rtr Exp $ */
+/* $NetBSD: uipc_usrreq.c,v 1.169.2.1 2014/10/11 16:16:44 snj Exp $ */
/*-
* Copyright (c) 1998, 2000, 2004, 2008, 2009 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.169 2014/08/09 05:33:00 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.169.2.1 2014/10/11 16:16:44 snj Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -927,8 +927,6 @@ makeun(struct mbuf *nam, size_t *addrlen
sun = malloc(*addrlen, M_SONAME, M_WAITOK);
m_copydata(nam, 0, nam->m_len, (void *)sun);
*(((char *)sun) + nam->m_len) = '\0';
- sun->sun_len = strlen(sun->sun_path) +
- offsetof(struct sockaddr_un, sun_path);
return sun;
}