summaryrefslogtreecommitdiffstats
path: root/libexec/login_radius
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-01-16 06:39:28 +0000
committerderaadt <deraadt@openbsd.org>2015-01-16 06:39:28 +0000
commitb9fc9a728fce9c4289b7e9a992665e28d5629a54 (patch)
tree72b2433e418dfa1aef5fcf8305617b97979a25d8 /libexec/login_radius
parentimprove checksum parsing slightly. now handles filenames with spaces. (diff)
downloadwireguard-openbsd-b9fc9a728fce9c4289b7e9a992665e28d5629a54.tar.xz
wireguard-openbsd-b9fc9a728fce9c4289b7e9a992665e28d5629a54.zip
Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
Diffstat (limited to 'libexec/login_radius')
-rw-r--r--libexec/login_radius/raddauth.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libexec/login_radius/raddauth.c b/libexec/login_radius/raddauth.c
index b0fb6933451..71089908058 100644
--- a/libexec/login_radius/raddauth.c
+++ b/libexec/login_radius/raddauth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raddauth.c,v 1.26 2014/08/10 05:06:38 guenther Exp $ */
+/* $OpenBSD: raddauth.c,v 1.27 2015/01/16 06:39:50 deraadt Exp $ */
/*-
* Copyright (c) 1996, 1997 Berkeley Software Design, Inc. All rights reserved.
@@ -483,7 +483,7 @@ rad_recv(char *state, char *challenge, u_char *req_vector)
in_addr_t
gethost(void)
{
- char hostname[MAXHOSTNAMELEN];
+ char hostname[HOST_NAME_MAX+1];
if (gethostname(hostname, sizeof(hostname)))
err(1, "gethost");
@@ -511,7 +511,7 @@ void
getsecret(void)
{
FILE *servfd;
- char *host, *secret, buffer[MAXPATHLEN];
+ char *host, *secret, buffer[PATH_MAX];
size_t len;
snprintf(buffer, sizeof(buffer), "%s/%s",