diff options
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 48a8ba97..0f51888 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -219,7 +219,7 @@ ffs_mount(mp, path, data, ndp, td) * If upgrade to read-write by non-root, then verify * that user has necessary permissions on the device. */ - if (td->td_proc->p_ucred->cr_uid != 0) { + if (suser_td(td)) { vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); if ((error = VOP_ACCESS(devvp, VREAD | VWRITE, td->td_proc->p_ucred, td)) != 0) { @@ -300,7 +300,7 @@ ffs_mount(mp, path, data, ndp, td) * If mount by non-root, then verify that user has necessary * permissions on the device. */ - if (td->td_proc->p_ucred->cr_uid != 0) { + if (suser_td(td)) { accessmode = VREAD; if ((mp->mnt_flag & MNT_RDONLY) == 0) accessmode |= VWRITE; |