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