diff options
author | trasz <trasz@FreeBSD.org> | 2008-10-28 13:44:11 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2008-10-28 13:44:11 +0000 |
commit | 0ad8692247694171bf2d3f963f24b15f5223a0de (patch) | |
tree | cb5d9bbe34cd6eae2c3dd212bdfdfd85569424dd /sys/gnu/fs | |
parent | bc6713490924420312442a3f3fc4ef1fe4b8e400 (diff) | |
download | FreeBSD-src-0ad8692247694171bf2d3f963f24b15f5223a0de.zip FreeBSD-src-0ad8692247694171bf2d3f963f24b15f5223a0de.tar.gz |
Introduce accmode_t. This is required for NFSv4 ACLs - it will be neccessary
to add more V* constants, and the variables changed by this patch were often
being assigned to mode_t variables, which is 16 bit.
Approved by: rwatson (mentor)
Diffstat (limited to 'sys/gnu/fs')
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_vfsops.c | 8 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_vnops.c | 10 | ||||
-rw-r--r-- | sys/gnu/fs/reiserfs/reiserfs_vfsops.c | 8 | ||||
-rw-r--r-- | sys/gnu/fs/reiserfs/reiserfs_vnops.c | 8 | ||||
-rw-r--r-- | sys/gnu/fs/xfs/FreeBSD/xfs_super.c | 8 | ||||
-rw-r--r-- | sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c | 4 |
6 files changed, 23 insertions, 23 deletions
diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c index 5e3c56c..0968e48 100644 --- a/sys/gnu/fs/ext2fs/ext2_vfsops.c +++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c @@ -137,7 +137,7 @@ ext2_mount(mp, td) struct ext2_sb_info *fs; char *path, *fspec; int error, flags, len; - mode_t accessmode; + accmode_t accmode; struct nameidata nd, *ndp = &nd; opts = mp->mnt_optnew; @@ -265,10 +265,10 @@ ext2_mount(mp, td) * * XXXRW: VOP_ACCESS() enough? */ - 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/gnu/fs/ext2fs/ext2_vnops.c b/sys/gnu/fs/ext2fs/ext2_vnops.c index 6296c0e..f81d509 100644 --- a/sys/gnu/fs/ext2fs/ext2_vnops.c +++ b/sys/gnu/fs/ext2fs/ext2_vnops.c @@ -283,14 +283,14 @@ static int ext2_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; if (vp->v_type == VBLK || vp->v_type == VCHR) @@ -301,7 +301,7 @@ ext2_access(ap) * unless the file is a socket, fifo, or a block or * character device resident on the file system. */ - if (mode & VWRITE) { + if (accmode & VWRITE) { switch (vp->v_type) { case VDIR: case VLNK: @@ -315,11 +315,11 @@ ext2_access(ap) } /* 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); 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); } diff --git a/sys/gnu/fs/reiserfs/reiserfs_vfsops.c b/sys/gnu/fs/reiserfs/reiserfs_vfsops.c index 7ffac96..6704b07 100644 --- a/sys/gnu/fs/reiserfs/reiserfs_vfsops.c +++ b/sys/gnu/fs/reiserfs/reiserfs_vfsops.c @@ -74,7 +74,7 @@ reiserfs_mount(struct mount *mp, struct thread *td) { size_t size; int error, len; - mode_t accessmode; + accmode_t accmode; char *path, *fspec; struct vnode *devvp; struct vfsoptlist *opts; @@ -124,10 +124,10 @@ reiserfs_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/gnu/fs/reiserfs/reiserfs_vnops.c b/sys/gnu/fs/reiserfs/reiserfs_vnops.c index 14242464..e6323ea 100644 --- a/sys/gnu/fs/reiserfs/reiserfs_vnops.c +++ b/sys/gnu/fs/reiserfs/reiserfs_vnops.c @@ -57,14 +57,14 @@ reiserfs_access(struct vop_access_args *ap) int error; struct vnode *vp = ap->a_vp; struct reiserfs_node *ip = VTOI(vp); - mode_t mode = ap->a_mode; + accmode_t accmode = ap->a_accmode; /* * Disallow write attempts on read-only file systems; unless the file * is a socket, fifo, or a block or character device resident on the * file system. */ - if (mode & VWRITE) { + if (accmode & VWRITE) { switch (vp->v_type) { case VDIR: case VLNK: @@ -81,13 +81,13 @@ reiserfs_access(struct vop_access_args *ap) } /* 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))) { reiserfs_log(LOG_DEBUG, "no write access (immutable)\n"); return (EPERM); } 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); } diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_super.c b/sys/gnu/fs/xfs/FreeBSD/xfs_super.c index 2d92d003..899a41c 100644 --- a/sys/gnu/fs/xfs/FreeBSD/xfs_super.c +++ b/sys/gnu/fs/xfs/FreeBSD/xfs_super.c @@ -133,7 +133,7 @@ xfs_blkdev_get( struct vnode *devvp; struct g_consumer *cp; struct g_provider *pp; - mode_t accessmode; + accmode_t accmode; td = curthread; @@ -151,10 +151,10 @@ xfs_blkdev_get( vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); ronly = ((XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY) != 0); - accessmode = VREAD; + accmode = VREAD; if (!ronly) - 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/gnu/fs/xfs/FreeBSD/xfs_vnops.c b/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c index 8296552..d0efcf2 100644 --- a/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c +++ b/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c @@ -180,14 +180,14 @@ static int _xfs_access( struct vop_access_args /* { struct vnode *a_vp; - int a_mode; + accmode_t a_accmode; struct ucred *a_cred; struct thread *a_td; } */ *ap) { int error; - XVOP_ACCESS(VPTOXFSVP(ap->a_vp), ap->a_mode, ap->a_cred, error); + XVOP_ACCESS(VPTOXFSVP(ap->a_vp), ap->a_accmode, ap->a_cred, error); return (error); } |