Author: brooks
Date: Wed Dec 14 21:13:10 2016
New Revision: 310090
URL: https://svnweb.freebsd.org/changeset/base/310090

Log:
  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

Modified:
  head/bin/df/df.c

Modified: head/bin/df/df.c
==============================================================================
--- head/bin/df/df.c    Wed Dec 14 21:12:43 2016        (r310089)
+++ head/bin/df/df.c    Wed Dec 14 21:13:10 2016        (r310090)
@@ -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;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to