summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/monitor.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-01-16 06:40:24 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-01-16 06:40:24 +0000
commit315054f4737a39489e0a14f3a92bff61f1592832 (patch)
tree62bf010653374ce09b6beb4dfa0414a91457233b /sbin/isakmpd/monitor.c
parent79e3d817585ca08a91e30ad14abe43e2ab70295f (diff)
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/isakmpd/monitor.c')
-rw-r--r--sbin/isakmpd/monitor.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sbin/isakmpd/monitor.c b/sbin/isakmpd/monitor.c
index 83a372e226e..4d4737f1e4e 100644
--- a/sbin/isakmpd/monitor.c
+++ b/sbin/isakmpd/monitor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: monitor.c,v 1.72 2010/05/10 02:00:50 krw Exp $ */
+/* $OpenBSD: monitor.c,v 1.73 2015/01/16 06:39:59 deraadt Exp $ */
/*
* Copyright (c) 2003 Håkan Olsson. All rights reserved.
@@ -24,7 +24,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
@@ -40,6 +39,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <limits.h>
#include <regex.h>
#include <keynote.h>
@@ -55,7 +55,7 @@
struct monitor_state {
pid_t pid;
int s;
- char root[MAXPATHLEN];
+ char root[PATH_MAX];
} m_state;
extern char *pid_file;
@@ -194,7 +194,7 @@ monitor_open(const char *path, int flags, mode_t mode)
{
size_t len;
int fd, err, cmd;
- char pathreal[MAXPATHLEN];
+ char pathreal[PATH_MAX];
if (path[0] == '/')
strlcpy(pathreal, path, sizeof pathreal);
@@ -498,7 +498,7 @@ m_priv_pfkey_open(void)
static void
m_priv_getfd(void)
{
- char path[MAXPATHLEN];
+ char path[PATH_MAX];
size_t len;
int v, flags, ret;
int err = 0;
@@ -804,7 +804,7 @@ static void
m_priv_req_readdir()
{
size_t len;
- char path[MAXPATHLEN];
+ char path[PATH_MAX];
DIR *dp;
struct dirent *file;
struct stat sb;