We probably shouldn't allow users to mount file systems with MNT_SUIDDIR.
There should be not shell access when SUIDDIR is compiled in, but better be sure. Reviewed by: rwatson
This commit is contained in:
parent
11f479f519
commit
b05f0288da
@ -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
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user