summaryrefslogtreecommitdiffstats
path: root/sbin/mount_msdos/mount_msdos.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 /sbin/mount_msdos/mount_msdos.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 'sbin/mount_msdos/mount_msdos.c')
-rw-r--r--sbin/mount_msdos/mount_msdos.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/mount_msdos/mount_msdos.c b/sbin/mount_msdos/mount_msdos.c
index 9cd5876b779..3057b45828f 100644
--- a/sbin/mount_msdos/mount_msdos.c
+++ b/sbin/mount_msdos/mount_msdos.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mount_msdos.c,v 1.28 2013/11/22 04:12:48 deraadt Exp $ */
+/* $OpenBSD: mount_msdos.c,v 1.29 2015/01/16 06:39:59 deraadt Exp $ */
/* $NetBSD: mount_msdos.c,v 1.16 1996/10/24 00:12:50 cgd Exp $ */
/*
@@ -31,7 +31,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <ctype.h>
@@ -42,6 +42,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <limits.h>
#include <errno.h>
#include "mntopts.h"
@@ -64,7 +65,7 @@ main(int argc, char **argv)
struct msdosfs_args args;
struct stat sb;
int c, mntflags, set_gid, set_uid, set_mask;
- char *dev, dir[MAXPATHLEN];
+ char *dev, dir[PATH_MAX];
char *errcause;
mntflags = set_gid = set_uid = set_mask = 0;