diff options
author | 2016-10-11 07:02:46 +0000 | |
---|---|---|
committer | 2016-10-11 07:02:46 +0000 | |
commit | 2fadc17284723bc587dd9d0a4801c3ecc8b8fe83 (patch) | |
tree | 3c6756efe74445474412fe85c526f453e2ea6b98 | |
parent | Reimplement g flag for s commands. Got lost in previous commit. (diff) | |
download | wireguard-openbsd-2fadc17284723bc587dd9d0a4801c3ecc8b8fe83.tar.xz wireguard-openbsd-2fadc17284723bc587dd9d0a4801c3ecc8b8fe83.zip |
Enable the noperm option for mount_mfs. mfs is ffs in sheeps clothing,
so we basically get this for free.
requested by espie
ok deraadt
-rw-r--r-- | sbin/newfs/newfs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index 21145752b9a..7a914eea22f 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: newfs.c,v 1.108 2016/07/25 15:30:36 krw Exp $ */ +/* $OpenBSD: newfs.c,v 1.109 2016/10/11 07:02:46 natano Exp $ */ /* $NetBSD: newfs.c,v 1.20 1996/05/16 07:13:03 thorpej Exp $ */ /* @@ -78,6 +78,7 @@ struct mntopt mopts[] = { MOPT_STDOPTS, MOPT_WXALLOWED, + MOPT_NOPERM, MOPT_ASYNC, MOPT_UPDATE, MOPT_FORCE, @@ -522,6 +523,8 @@ havelabel: args.export_info.ex_root = -2; if (mntflags & MNT_RDONLY) args.export_info.ex_flags = MNT_EXRDONLY; + if (mntflags & MNT_NOPERM) + mntflags |= MNT_NODEV | MNT_NOEXEC; switch (pid = fork()) { case -1: |