summaryrefslogtreecommitdiffstats
path: root/libexec/talkd/talkd.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 /libexec/talkd/talkd.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 'libexec/talkd/talkd.c')
-rw-r--r--libexec/talkd/talkd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libexec/talkd/talkd.c b/libexec/talkd/talkd.c
index ee2e7be2bad..f28d7acf071 100644
--- a/libexec/talkd/talkd.c
+++ b/libexec/talkd/talkd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: talkd.c,v 1.22 2009/10/27 23:59:31 deraadt Exp $ */
+/* $OpenBSD: talkd.c,v 1.23 2015/01/16 06:39:51 deraadt Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -35,7 +35,6 @@
* disconnect all descriptors and ttys, and then endless
* loop on waiting for and processing requests
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <protocols/talkd.h>
@@ -44,6 +43,7 @@
#include <time.h>
#include <errno.h>
#include <unistd.h>
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -54,7 +54,7 @@ int debug = 0;
void timeout(int);
long lastmsgtime;
-char hostname[MAXHOSTNAMELEN];
+char hostname[HOST_NAME_MAX+1];
#define TIMEOUT 30
#define MAXIDLE 120