]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Increase YPMAXRECORD to 16M to be compatible with Linux.
authorkib <kib@FreeBSD.org>
Mon, 12 Aug 2019 20:27:33 +0000 (20:27 +0000)
committerkib <kib@FreeBSD.org>
Mon, 12 Aug 2019 20:27:33 +0000 (20:27 +0000)
commit792fd42d7804a39bbe85e54b87c2c18dc09dffe5
treec34db7db1d9f957ee3ad8efecf57b06a29f10f68
parentdcf7a30f5fa47dd7082e6ef3dfb49253d9f40ebf
Increase YPMAXRECORD to 16M to be compatible with Linux.

Since YP protocol definition uses the constant to declare
variable-size opaque byte strings, the change should be binary
compatible with existing installations which do not expose keys or
values larger than 1024 bytes.

All uses of local variables with YPMAXRECORD sizes were removed to
avoid insane stack use.  On the other hand, variables with static
lifetime should be fine and only result in increased VA use.

Glibc made same change, increasing the allowed length for keys and
values in YP to 16M, in 2013.

Reviewed by: markj
Discussed with: ian
Sponsored by: Mellanox Technologies
MFC after: 3 weeks
Differential revision: https://reviews.freebsd.org/D20900
12 files changed:
include/rpcsvc/yp.x
include/rpcsvc/yp_prot.h
include/rpcsvc/ypxfrd.x
lib/libc/net/gethostbynis.c
lib/libc/net/getnetbynis.c
lib/libc/net/getservent.c
lib/libc/rpc/getrpcent.c
usr.sbin/rpc.yppasswdd/yppasswdd_server.c
usr.sbin/rpc.ypupdated/yp_dbupdate.c
usr.sbin/ypldap/yp.c
usr.sbin/yppush/yppush_main.c
usr.sbin/ypserv/yp_server.c