diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 53eb026b0915..b4e113b2d775 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -696,10 +696,12 @@ vfs_domount( } /* * Silently enforce MNT_NOSUID, MNT_NODEV and MNT_USER - * for unprivileged users. + * for unprivileged users and remove MNT_SUIDDIR. */ - if (suser(td)) + if (suser(td)) { + fsflags &= ~MNT_SUIDDIR; fsflags |= MNT_NOSUID | MNT_NODEV | MNT_USER; + } /* * Get vnode to be covered */