summaryrefslogtreecommitdiffstats
path: root/usr.bin/ftp/ftp_var.h
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/ftp/ftp_var.h
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/ftp/ftp_var.h')
-rw-r--r--usr.bin/ftp/ftp_var.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/ftp/ftp_var.h b/usr.bin/ftp/ftp_var.h
index 7a0a279effa..3974cdeb68d 100644
--- a/usr.bin/ftp/ftp_var.h
+++ b/usr.bin/ftp/ftp_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftp_var.h,v 1.36 2014/10/31 13:48:21 jsing Exp $ */
+/* $OpenBSD: ftp_var.h,v 1.37 2015/01/16 06:40:08 deraadt Exp $ */
/* $NetBSD: ftp_var.h,v 1.18 1997/08/18 10:20:25 lukem Exp $ */
/*
@@ -65,7 +65,8 @@
* FTP global variables.
*/
-#include <sys/param.h>
+#include <sys/signal.h>
+#include <limits.h>
#include <setjmp.h>
#ifndef SMALL
@@ -84,7 +85,7 @@ int fclose(FILE *);
#include "small.h"
#define HASHBYTES 1024
-#define FTPBUFLEN MAXPATHLEN + 200
+#define FTPBUFLEN PATH_MAX + 200
#define STALLTIME 5 /* # of seconds of no xfer before "stalling" */
@@ -138,8 +139,8 @@ int passivemode; /* passive mode enabled */
int activefallback; /* fall back to active mode if passive fails */
char ntin[17]; /* input translation table */
char ntout[17]; /* output translation table */
-char mapin[MAXPATHLEN]; /* input map template */
-char mapout[MAXPATHLEN]; /* output map template */
+char mapin[PATH_MAX]; /* input map template */
+char mapout[PATH_MAX]; /* output map template */
char typename[32]; /* name of file transfer type */
int type; /* requested file transfer type */
int curtype; /* current file transfer type */