mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Correct devfs ruleset bypass.
Submitted by: csjp Reviewed by: phk Security: FreeBSD-SA-05:17.devfs Approved by: cperciva
This commit is contained in:
parent
0e0fe87a70
commit
02a4be3f74
1 changed files with 6 additions and 0 deletions
|
|
@ -788,6 +788,12 @@ devfs_mknod(struct vop_mknod_args *ap)
|
|||
struct devfs_mount *dmp;
|
||||
int error;
|
||||
|
||||
/*
|
||||
* The only type of node we should be creating here is a
|
||||
* character device, for anything else return EOPNOTSUPP.
|
||||
*/
|
||||
if (ap->a_vap->va_type != VCHR)
|
||||
return (EOPNOTSUPP);
|
||||
dvp = ap->a_dvp;
|
||||
dmp = VFSTODEVFS(dvp->v_mount);
|
||||
lockmgr(&dmp->dm_lock, LK_EXCLUSIVE, 0, curthread);
|
||||
|
|
|
|||
Loading…
Reference in a new issue