From 9dad1250d735a8ec06a52d7512ad0a0b2f513645 Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Wed, 14 Dec 2016 21:13:10 +0000 Subject: [PATCH] Mount filesystems without executable permissions since they should never be used. Reviewed by: cem MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D8513 --- bin/df/df.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/df/df.c b/bin/df/df.c index e07df3270356..3ed7c1e8f49c 100644 --- a/bin/df/df.c +++ b/bin/df/df.c @@ -251,7 +251,7 @@ main(int argc, char *argv[]) free(mntpath); continue; } - if (mount(fstype, mntpt, MNT_RDONLY, + if (mount(fstype, mntpt, MNT_RDONLY|MNT_NOEXEC, &mdev) != 0) { xo_warn("%s", *argv); rv = 1;