ce426f
diff -Nru glibc-2.17-c758a686/nis/yp_xdr.c glibc-2.17-c758a686/nis/yp_xdr.c
ce426f
--- glibc-2.17-c758a686/nis/yp_xdr.c	2012-12-24 22:02:13.000000000 -0500
ce426f
+++ glibc-2.17-c758a686/nis/yp_xdr.c	2013-04-17 15:26:50.168999686 -0400
ce426f
@@ -32,6 +32,14 @@
ce426f
 #include <rpcsvc/yp.h>
ce426f
 #include <rpcsvc/ypclnt.h>
ce426f
 
ce426f
+/* The specification suggests 1024 as a maximum length of all fields, 
ce426f
+   but current linux systems usually don't use any limits. So, to stay 
ce426f
+   as much compatible as possible with recent linux systems we choose 
ce426f
+   limits large enough to avoid problems. */
ce426f
+
ce426f
+#define XDRMAXNAME 1024
ce426f
+#define XDRMAXRECORD 16 * 1024 * 1024
ce426f
+
ce426f
 bool_t
ce426f
 xdr_ypstat (XDR *xdrs, ypstat *objp)
ce426f
 {
ce426f
@@ -49,21 +57,21 @@ libnsl_hidden_def (xdr_ypxfrstat)
ce426f
 bool_t
ce426f
 xdr_domainname (XDR *xdrs, domainname *objp)
ce426f
 {
ce426f
-  return xdr_string (xdrs, objp, YPMAXDOMAIN);
ce426f
+  return xdr_string (xdrs, objp, XDRMAXNAME);
ce426f
 }
ce426f
 libnsl_hidden_def (xdr_domainname)
ce426f
 
ce426f
 bool_t
ce426f
 xdr_mapname (XDR *xdrs, mapname *objp)
ce426f
 {
ce426f
-  return xdr_string (xdrs, objp, YPMAXMAP);
ce426f
+  return xdr_string (xdrs, objp, XDRMAXNAME);
ce426f
 }
ce426f
 libnsl_hidden_def (xdr_mapname)
ce426f
 
ce426f
 bool_t
ce426f
 xdr_peername (XDR *xdrs, peername *objp)
ce426f
 {
ce426f
-  return xdr_string (xdrs, objp, YPMAXPEER);
ce426f
+  return xdr_string (xdrs, objp, XDRMAXNAME);
ce426f
 }
ce426f
 libnsl_hidden_def (xdr_peername)
ce426f
 
ce426f
@@ -71,7 +79,7 @@ bool_t
ce426f
 xdr_keydat (XDR *xdrs, keydat *objp)
ce426f
 {
ce426f
   return xdr_bytes (xdrs, (char **) &objp->keydat_val,
ce426f
-		    (u_int *) &objp->keydat_len, YPMAXRECORD);
ce426f
+		    (u_int *) &objp->keydat_len, XDRMAXRECORD);
ce426f
 }
ce426f
 libnsl_hidden_def (xdr_keydat)
ce426f
 
ce426f
@@ -79,7 +87,7 @@ bool_t
ce426f
 xdr_valdat (XDR *xdrs, valdat *objp)
ce426f
 {
ce426f
   return xdr_bytes (xdrs, (char **) &objp->valdat_val,
ce426f
-		    (u_int *) &objp->valdat_len, YPMAXRECORD);
ce426f
+		    (u_int *) &objp->valdat_len, XDRMAXRECORD);
ce426f
 }
ce426f
 libnsl_hidden_def (xdr_valdat)
ce426f