- Update patch (#848748) for xdr request to use XDRMAXNAME and
    	  XDRMAXRECORD (#892777).
This commit is contained in:
Patsy Franklin 2013-04-30 08:42:32 -04:00
parent 029cff4af7
commit 3d70261213
2 changed files with 38 additions and 20 deletions

View File

@ -1,22 +1,36 @@
2012-10-01 Patsy Franklin <pfrankli@redhat.com>
Honza Horak <hhorak@redhat.com>
2013-04-30 Patsy Franklin <pfrankli@redhat.com>
* nis/yp_xdr.c (xdr_domainname): Use YPMAXDOMAIN as maxsize.
(xdr_mapname): Use YPMAXMAP as maxsize.
(xdr_peername): Use YPMAXPEER as maxsize.
(xdr_keydat): Use YPAXRECORD as maxsize.
(xdr_valdat): Use YPMAXRECORD as maxsize.
* nis/yp_xdr.c: Defined XDRMAXNAME and XDRMAXRECORD.
(xdr_domainname): Use XDRMAXNAME as maxsize.
(xdr_mapname): Use XDRMAXNAME as maxsize.
(xdr_peername): Use XDRMAXNAME as maxsize.
(xdr_keydat): Use XDRMAXRECORD as maxsize.
(xdr_valdat): Use XDRMAXRECORD as maxsize.
diff --git a/nis/yp_xdr.c b/nis/yp_xdr.c
index 76e0f2f..4188506 100644
--- a/nis/yp_xdr.c
+++ b/nis/yp_xdr.c
@@ -49,21 +49,21 @@ libnsl_hidden_def (xdr_ypxfrstat)
diff -Nrup a/nis/yp_xdr.c b/nis/yp_xdr.c
--- a/nis/yp_xdr.c 2012-06-30 15:12:34.000000000 -0400
+++ b/nis/yp_xdr.c 2013-04-30 05:36:02.492835503 -0400
@@ -32,6 +32,14 @@
#include <rpcsvc/yp.h>
#include <rpcsvc/ypclnt.h>
+/* The specification suggests 1024 as a maximum length of all fields,
+ but current linux systems usually don't use any limits. So, to stay
+ as much compatible as possible with recent linux systems we choose
+ limits large enough to avoid problems. */
+
+#define XDRMAXNAME 1024
+#define XDRMAXRECORD 16 * 1024 * 1024
+
bool_t
xdr_ypstat (XDR *xdrs, ypstat *objp)
{
@@ -49,21 +57,21 @@ libnsl_hidden_def (xdr_ypxfrstat)
bool_t
xdr_domainname (XDR *xdrs, domainname *objp)
{
- return xdr_string (xdrs, objp, ~0);
+ return xdr_string (xdrs, objp, YPMAXDOMAIN);
+ return xdr_string (xdrs, objp, XDRMAXNAME);
}
libnsl_hidden_def (xdr_domainname)
@ -24,7 +38,7 @@ index 76e0f2f..4188506 100644
xdr_mapname (XDR *xdrs, mapname *objp)
{
- return xdr_string (xdrs, objp, ~0);
+ return xdr_string (xdrs, objp, YPMAXMAP);
+ return xdr_string (xdrs, objp, XDRMAXNAME);
}
libnsl_hidden_def (xdr_mapname)
@ -32,25 +46,25 @@ index 76e0f2f..4188506 100644
xdr_peername (XDR *xdrs, peername *objp)
{
- return xdr_string (xdrs, objp, ~0);
+ return xdr_string (xdrs, objp, YPMAXPEER);
+ return xdr_string (xdrs, objp, XDRMAXNAME);
}
libnsl_hidden_def (xdr_peername)
@@ -71,7 +71,7 @@ bool_t
@@ -71,7 +79,7 @@ bool_t
xdr_keydat (XDR *xdrs, keydat *objp)
{
return xdr_bytes (xdrs, (char **) &objp->keydat_val,
- (u_int *) &objp->keydat_len, ~0);
+ (u_int *) &objp->keydat_len, YPMAXRECORD);
+ (u_int *) &objp->keydat_len, XDRMAXRECORD);
}
libnsl_hidden_def (xdr_keydat)
@@ -79,7 +79,7 @@ bool_t
@@ -79,7 +87,7 @@ bool_t
xdr_valdat (XDR *xdrs, valdat *objp)
{
return xdr_bytes (xdrs, (char **) &objp->valdat_val,
- (u_int *) &objp->valdat_len, ~0);
+ (u_int *) &objp->valdat_len, YPMAXRECORD);
+ (u_int *) &objp->valdat_len, XDRMAXRECORD);
}
libnsl_hidden_def (xdr_valdat)

View File

@ -28,7 +28,7 @@
Summary: The GNU libc libraries
Name: glibc
Version: %{glibcversion}
Release: 30%{?dist}
Release: 31%{?dist}
# GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries.
# Things that are linked directly into dynamically linked programs
# and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional
@ -1290,6 +1290,10 @@ rm -f *.filelist*
%endif
%changelog
* Tue Apr 30 2013 Patsy Franklin <pfrankli@redhat.com> - 2.16-31
- Update patch (#848748) for xdr request to use XDRMAXNAME and
XDRMAXRECORD (#892777).
* Sun Mar 17 2013 Carlos O'Donell <carlos@redhat.com> - 2.16-30
- Fix ownership of /usr/lib[64]/audit (#894307).
- Rename release engineering directory to `releng' (#903754).