Remove duplicate security checks already performed in kern_kldload().

This commit is contained in:
John Baldwin 2006-06-26 18:33:32 +00:00
parent cc477a6347
commit 322fb40cbf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=159956

View File

@ -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);