[Midnightbsd-cvs] src [7342] trunk: revise rpcbind patch
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Fri Oct 2 22:19:48 EDT 2015
Revision: 7342
http://svnweb.midnightbsd.org/src/?rev=7342
Author: laffer1
Date: 2015-10-02 22:19:48 -0400 (Fri, 02 Oct 2015)
Log Message:
-----------
revise rpcbind patch
Modified Paths:
--------------
trunk/UPDATING
trunk/usr.sbin/rpcbind/rpcb_svc_com.c
Modified: trunk/UPDATING
===================================================================
--- trunk/UPDATING 2015-09-30 23:56:23 UTC (rev 7341)
+++ trunk/UPDATING 2015-10-03 02:19:48 UTC (rev 7342)
@@ -1,5 +1,8 @@
Updating Information for MidnightBSD users.
+20151002:
+ Revised rpcbind(8) patch to fix issues with NIS
+
20150930:
In rpcbind(8), netbuf structures are copied directly, which would result in
two netbuf structures that reference to one shared address buffer. When one
Modified: trunk/usr.sbin/rpcbind/rpcb_svc_com.c
===================================================================
--- trunk/usr.sbin/rpcbind/rpcb_svc_com.c 2015-09-30 23:56:23 UTC (rev 7341)
+++ trunk/usr.sbin/rpcbind/rpcb_svc_com.c 2015-10-03 02:19:48 UTC (rev 7342)
@@ -1053,12 +1053,15 @@
netbuf_copybuf(struct netbuf *dst, const struct netbuf *src)
{
- assert(dst->buf == NULL);
+ if (dst->len != src->len || dst->buf == NULL) {
+ if (dst->buf != NULL)
+ free(dst->buf);
+ if ((dst->buf = malloc(src->len)) == NULL)
+ return (FALSE);
- if ((dst->buf = malloc(src->len)) == NULL)
- return (FALSE);
+ dst->maxlen = dst->len = src->len;
+ }
- dst->maxlen = dst->len = src->len;
memcpy(dst->buf, src->buf, src->len);
return (TRUE);
}
More information about the Midnightbsd-cvs
mailing list