summaryrefslogtreecommitdiffstats
path: root/libexec/getty
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-01-16 05:53:49 +0000
committerderaadt <deraadt@openbsd.org>2015-01-16 05:53:49 +0000
commit52dc30e12094486bde4b1f8f9e3b470640dd860e (patch)
tree3c2ffb30b435d24f2acbfb16206b1db99a4f0143 /libexec/getty
parentIf MAXPATHLEN is undefined, do not set it to 512. Dangerous. (diff)
downloadwireguard-openbsd-52dc30e12094486bde4b1f8f9e3b470640dd860e.tar.xz
wireguard-openbsd-52dc30e12094486bde4b1f8f9e3b470640dd860e.zip
adjust to HOST_NAME_MAX+1 & LOGIN_NAME_MAX
Diffstat (limited to 'libexec/getty')
-rw-r--r--libexec/getty/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libexec/getty/main.c b/libexec/getty/main.c
index b0824f20245..4071b140169 100644
--- a/libexec/getty/main.c
+++ b/libexec/getty/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.34 2014/11/19 13:35:37 krw Exp $ */
+/* $OpenBSD: main.c,v 1.35 2015/01/16 05:53:49 deraadt Exp $ */
/*-
* Copyright (c) 1980, 1993
@@ -29,7 +29,6 @@
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/stat.h>
#include <termios.h>
#include <sys/ioctl.h>
@@ -45,6 +44,7 @@
#include <syslog.h>
#include <stdio.h>
#include <unistd.h>
+#include <limits.h>
#include <util.h>
#include "gettytab.h"
@@ -71,9 +71,9 @@ struct termios tmode, omode;
int crmod, digit, lower, upper;
-char hostname[MAXHOSTNAMELEN];
+char hostname[HOST_NAME_MAX+1];
struct utsname kerninfo;
-char name[MAXLOGNAME];
+char name[LOGIN_NAME_MAX];
char dev[] = _PATH_DEV;
char ttyn[32];
char *portselector(void);