summaryrefslogtreecommitdiffstats
path: root/sys/fs/msdosfs/msdosfs_vfsops.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/msdosfs/msdosfs_vfsops.c')
-rw-r--r--sys/fs/msdosfs/msdosfs_vfsops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c
index d3b1c58..687956f 100644
--- a/sys/fs/msdosfs/msdosfs_vfsops.c
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c
@@ -195,7 +195,7 @@ msdosfs_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)) {
devvp = pmp->pm_devvp;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
error = VOP_ACCESS(devvp, VREAD | VWRITE,
@@ -242,7 +242,7 @@ msdosfs_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;
OpenPOWER on IntegriCloud