Remove duplicate security checks already performed in kern_kldload().
This commit is contained in:
parent
cc477a6347
commit
322fb40cbf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=159956
@ -115,13 +115,7 @@ vfs_byname_kld(const char *fstype, struct thread *td, int *error)
|
||||
if (vfsp != NULL)
|
||||
return (vfsp);
|
||||
|
||||
/* Only load modules for root (very important!). */
|
||||
*error = suser(td);
|
||||
if (*error)
|
||||
return (NULL);
|
||||
*error = securelevel_gt(td->td_ucred, 0);
|
||||
if (*error)
|
||||
return (NULL);
|
||||
/* Try to load the respective module. */
|
||||
*error = kern_kldload(td, fstype, &fileid);
|
||||
if (*error)
|
||||
return (NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user