diff options
| author | 2015-01-16 06:39:28 +0000 | |
|---|---|---|
| committer | 2015-01-16 06:39:28 +0000 | |
| commit | b9fc9a728fce9c4289b7e9a992665e28d5629a54 (patch) | |
| tree | 72b2433e418dfa1aef5fcf8305617b97979a25d8 /sbin/iked/iked.c | |
| parent | improve checksum parsing slightly. now handles filenames with spaces. (diff) | |
| download | wireguard-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 'sbin/iked/iked.c')
| -rw-r--r-- | sbin/iked/iked.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sbin/iked/iked.c b/sbin/iked/iked.c index 22bc0c5aec8..182b756dc02 100644 --- a/sbin/iked/iked.c +++ b/sbin/iked/iked.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iked.c,v 1.22 2014/08/18 09:43:02 reyk Exp $ */ +/* $OpenBSD: iked.c,v 1.23 2015/01/16 06:39:58 deraadt Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org> @@ -16,7 +16,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <sys/param.h> #include <sys/queue.h> #include <sys/socket.h> #include <sys/wait.h> @@ -124,8 +123,8 @@ main(int argc, char *argv[]) (IKED_OPT_NONATT|IKED_OPT_NATT)) errx(1, "conflicting NAT-T options"); - if (strlcpy(env->sc_conffile, conffile, MAXPATHLEN) >= MAXPATHLEN) - errx(1, "config file exceeds MAXPATHLEN"); + if (strlcpy(env->sc_conffile, conffile, PATH_MAX) >= PATH_MAX) + errx(1, "config file exceeds PATH_MAX"); ca_sslinit(); policy_init(env); |
