]> xenbits.xensource.com Git - people/royger/freebsd.git/commitdiff
Mount filesystems without executable permissions since they should never
authorbrooks <brooks@FreeBSD.org>
Wed, 14 Dec 2016 21:13:10 +0000 (21:13 +0000)
committerbrooks <brooks@FreeBSD.org>
Wed, 14 Dec 2016 21:13:10 +0000 (21:13 +0000)
be used.

Reviewed by: cem
MFC after: 1 week
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D8513

bin/df/df.c

index e07df3270356c3ec2fbd8c2668dd20d8e13fd361..3ed7c1e8f49cf1cd6ef5bd847bbdbc8b244bab60 100644 (file)
@@ -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;