From a2cbe77579ef161e0fc7f1aef22ff5f16f6ba5bb Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Sat, 10 Oct 2009 23:51:57 +0000 Subject: The YP protocol permits any string to be at least as long as YPMAXRECORD, so use that instead of _PW_NAME_LEN. with help from deraadt@ --- usr.sbin/ypldap/yp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/ypldap/yp.c b/usr.sbin/ypldap/yp.c index 065d6972620..363075c3a33 100644 --- a/usr.sbin/ypldap/yp.c +++ b/usr.sbin/ypldap/yp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: yp.c,v 1.3 2009/07/23 19:37:38 blambert Exp $ */ +/* $OpenBSD: yp.c,v 1.4 2009/10/10 23:51:56 robert Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard * @@ -321,7 +321,7 @@ ypproc_match_2_svc(ypreq_key *arg, struct svc_req *req) struct groupent *ge; static struct ypresp_val res; const char *estr; - char key[_PW_NAME_LEN+1]; + char key[YPMAXRECORD+1]; if (yp_valid_domain(arg->domain, (struct ypresp_val *)&res) == -1) return (&res); @@ -440,7 +440,7 @@ ypproc_next_2_svc(ypreq_key *arg, struct svc_req *req) struct groupent *ge; char *line; static struct ypresp_key_val res; - char key[_PW_NAME_LEN+1]; + char key[YPMAXRECORD+1]; if (yp_valid_domain(arg->domain, (struct ypresp_val *)&res) == -1) return (&res); -- cgit v1.2.3