aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/rpc.ypupdated
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2019-08-12 20:27:33 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2019-08-12 20:27:33 +0000
commit6b462d2762d67c5d839020d6cc77052bbf2a18cd (patch)
treec34db7db1d9f957ee3ad8efecf57b06a29f10f68 /usr.sbin/rpc.ypupdated
parent26b6a67b98153462d8a708461c9479e7a9b3a16d (diff)
downloadsrc-6b462d2762d67c5d839020d6cc77052bbf2a18cd.tar.gz
src-6b462d2762d67c5d839020d6cc77052bbf2a18cd.zip
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
Notes
Notes: svn path=/head/; revision=350957
Diffstat (limited to 'usr.sbin/rpc.ypupdated')
-rw-r--r--usr.sbin/rpc.ypupdated/yp_dbupdate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/rpc.ypupdated/yp_dbupdate.c b/usr.sbin/rpc.ypupdated/yp_dbupdate.c
index 84bacb905ac3..d4cfc7ac0353 100644
--- a/usr.sbin/rpc.ypupdated/yp_dbupdate.c
+++ b/usr.sbin/rpc.ypupdated/yp_dbupdate.c
@@ -81,7 +81,7 @@ ypmap_update(char *netname, char *map, unsigned int op, unsigned int keylen,
DB *dbp;
DBT key = { NULL, 0 }, data = { NULL, 0 };
char *yp_last = "YP_LAST_MODIFIED";
- char yplastbuf[YPMAXRECORD];
+ char yplastbuf[32];
char *domptr;
int rval = 0;