summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh-agent.c
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 /usr.bin/ssh/ssh-agent.c
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 'usr.bin/ssh/ssh-agent.c')
-rw-r--r--usr.bin/ssh/ssh-agent.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/ssh/ssh-agent.c b/usr.bin/ssh/ssh-agent.c
index 30756c31148..e149098ad5d 100644
--- a/usr.bin/ssh/ssh-agent.c
+++ b/usr.bin/ssh/ssh-agent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.195 2015/01/14 19:33:41 djm Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.196 2015/01/16 06:40:12 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -34,6 +34,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <sys/param.h> /* MIN MAX */
#include <sys/types.h>
#include <sys/time.h>
#include <sys/queue.h>
@@ -41,7 +42,6 @@
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/un.h>
-#include <sys/param.h>
#ifdef WITH_OPENSSL
#include <openssl/evp.h>
@@ -54,6 +54,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <limits.h>
#include <time.h>
#include <unistd.h>
@@ -120,8 +121,8 @@ time_t parent_alive_interval = 0;
pid_t cleanup_pid = 0;
/* pathname and directory for AUTH_SOCKET */
-char socket_name[MAXPATHLEN];
-char socket_dir[MAXPATHLEN];
+char socket_name[PATH_MAX];
+char socket_dir[PATH_MAX];
/* locking */
int locked = 0;