summaryrefslogtreecommitdiffstats
path: root/usr.sbin/cron/do_command.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2015-01-14 17:30:53 +0000
committermillert <millert@openbsd.org>2015-01-14 17:30:53 +0000
commit75e8a723db6084275296e9579b068154b22fd7df (patch)
tree4d3d2854d426418cc93c69b149a290519ac23e29 /usr.sbin/cron/do_command.c
parentUse HAVE_FOO for BSD-specific features instead of relying on the (diff)
downloadwireguard-openbsd-75e8a723db6084275296e9579b068154b22fd7df.tar.xz
wireguard-openbsd-75e8a723db6084275296e9579b068154b22fd7df.zip
Replace MAXHOSTNAMELEN with HOST_NAME_MAX+1 and MAXNAMLEN with NAME_MAX
and use limits.h instead of sys/param.h.
Diffstat (limited to 'usr.sbin/cron/do_command.c')
-rw-r--r--usr.sbin/cron/do_command.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/cron/do_command.c b/usr.sbin/cron/do_command.c
index 3f650b19a65..970276e8915 100644
--- a/usr.sbin/cron/do_command.c
+++ b/usr.sbin/cron/do_command.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: do_command.c,v 1.40 2015/01/14 17:27:51 millert Exp $ */
+/* $OpenBSD: do_command.c,v 1.41 2015/01/14 17:30:53 millert Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
@@ -400,7 +400,7 @@ child_process(entry *e, user *u) {
if (mailto) {
char **env;
char mailcmd[MAX_COMMAND];
- char hostname[MAXHOSTNAMELEN];
+ char hostname[HOST_NAME_MAX + 1];
gethostname(hostname, sizeof(hostname));
if (snprintf(mailcmd, sizeof mailcmd, MAILFMT,