diff options
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 8 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_vnops.c | 16 |
2 files changed, 12 insertions, 12 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 6e66c88..563473c 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -139,7 +139,7 @@ ffs_mount(struct mount *mp, struct thread *td) struct fs *fs; int error, flags; u_int mntorflags, mntandnotflags; - mode_t accessmode; + accmode_t accmode; struct nameidata ndp; char *fspec; @@ -384,10 +384,10 @@ ffs_mount(struct mount *mp, struct thread *td) * If mount by non-root, then verify that user has necessary * permissions on the device. */ - accessmode = VREAD; + accmode = VREAD; if ((mp->mnt_flag & MNT_RDONLY) == 0) - accessmode |= VWRITE; - error = VOP_ACCESS(devvp, accessmode, td->td_ucred, td); + accmode |= VWRITE; + error = VOP_ACCESS(devvp, accmode, td->td_ucred, td); if (error) error = priv_check(td, PRIV_VFS_MOUNT_PERM); if (error) { diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index eb851cf..e5047e9 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -301,14 +301,14 @@ static int ufs_access(ap) struct vop_access_args /* { struct vnode *a_vp; - int a_mode; + accmode_t a_accmode; struct ucred *a_cred; struct thread *a_td; } */ *ap; { struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); - mode_t mode = ap->a_mode; + accmode_t accmode = ap->a_accmode; int error; #ifdef QUOTA int relocked; @@ -322,7 +322,7 @@ ufs_access(ap) * unless the file is a socket, fifo, or a block or * character device resident on the filesystem. */ - if (mode & VWRITE) { + if (accmode & VWRITE) { switch (vp->v_type) { case VDIR: case VLNK: @@ -368,7 +368,7 @@ relock: } /* If immutable bit set, nobody gets to write it. */ - if ((mode & VWRITE) && (ip->i_flags & (IMMUTABLE | SF_SNAPSHOT))) + if ((accmode & VWRITE) && (ip->i_flags & (IMMUTABLE | SF_SNAPSHOT))) return (EPERM); #ifdef UFS_ACL @@ -379,11 +379,11 @@ relock: switch (error) { case EOPNOTSUPP: error = vaccess(vp->v_type, ip->i_mode, ip->i_uid, - ip->i_gid, ap->a_mode, ap->a_cred, NULL); + ip->i_gid, ap->a_accmode, ap->a_cred, NULL); break; case 0: error = vaccess_acl_posix1e(vp->v_type, ip->i_uid, - ip->i_gid, acl, ap->a_mode, ap->a_cred, NULL); + ip->i_gid, acl, ap->a_accmode, ap->a_cred, NULL); break; default: printf( @@ -395,13 +395,13 @@ relock: * EPERM for safety. */ error = vaccess(vp->v_type, ip->i_mode, ip->i_uid, - ip->i_gid, ap->a_mode, ap->a_cred, NULL); + ip->i_gid, ap->a_accmode, ap->a_cred, NULL); } uma_zfree(acl_zone, acl); } else #endif /* !UFS_ACL */ error = vaccess(vp->v_type, ip->i_mode, ip->i_uid, ip->i_gid, - ap->a_mode, ap->a_cred, NULL); + ap->a_accmode, ap->a_cred, NULL); return (error); } |