tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

vaccess -> genfs_can_access



Hi,

A while ago it was pointed out by several people that the newly added
routines in genfs (genfs_can_{chmod,chown,mount,chtimes}) belong to
the same class as the existing vaccess. The latter, regardless of having
a misleading 'v' prefix, has nothing to do with vnodes or the VFS layer,
and is a common routine used by file-system code.

Putting aside the question of what's the ultimate destination for all of
these, I think it makes sense to first have them all in one place.

The attached patch moves vaccess to genfs, renames it, and adjusts all
references.

The only open question is whether or not we want to keep vaccess (for
API compatibility?), which is why I didn't update any documentation,
etc. If we do, I won't change vnode.h, and make vaccess call
genfs_can_access in vfs_subr.c. (IMHO we shouldn't keep it.)

Please review. :)

Thanks,

-e.
Index: sys/sys/vnode.h
===================================================================
RCS file: /usr/cvs/src/sys/sys/vnode.h,v
retrieving revision 1.206
diff -u -p -r1.206 vnode.h
--- sys/sys/vnode.h     3 May 2009 16:52:55 -0000       1.206
+++ sys/sys/vnode.h     20 Jun 2009 20:51:16 -0000
@@ -587,7 +587,6 @@ int         cdevvp(dev_t, struct vnode **);
 int    getnewvnode(enum vtagtype, struct mount *, int (**)(void *),
            struct vnode **);
 void   ungetnewvnode(struct vnode *);
-int    vaccess(enum vtype, mode_t, uid_t, gid_t, mode_t, kauth_cred_t);
 void   vattr_null(struct vattr *);
 int    vcount(struct vnode *);
 void   vdevgone(int, int, int, enum vtype);
Index: sys/kern/vfs_subr.c
===================================================================
RCS file: /usr/cvs/src/sys/kern/vfs_subr.c,v
retrieving revision 1.378
diff -u -p -r1.378 vfs_subr.c
--- sys/kern/vfs_subr.c 3 May 2009 16:52:54 -0000       1.378
+++ sys/kern/vfs_subr.c 20 Jun 2009 20:51:10 -0000
@@ -2575,66 +2575,6 @@ printlockedvnodes(void)
 #endif
 
 /*
- * Do the usual access checking.
- * file_mode, uid and gid are from the vnode in question,
- * while acc_mode and cred are from the VOP_ACCESS parameter list
- */
-int
-vaccess(enum vtype type, mode_t file_mode, uid_t uid, gid_t gid,
-    mode_t acc_mode, kauth_cred_t cred)
-{
-       mode_t mask;
-       int error, ismember;
-
-       /*
-        * Super-user always gets read/write access, but execute access depends
-        * on at least one execute bit being set.
-        */
-       if (kauth_authorize_generic(cred, KAUTH_GENERIC_ISSUSER, NULL) == 0) {
-               if ((acc_mode & VEXEC) && type != VDIR &&
-                   (file_mode & (S_IXUSR|S_IXGRP|S_IXOTH)) == 0)
-                       return (EACCES);
-               return (0);
-       }
-
-       mask = 0;
-
-       /* Otherwise, check the owner. */
-       if (kauth_cred_geteuid(cred) == uid) {
-               if (acc_mode & VEXEC)
-                       mask |= S_IXUSR;
-               if (acc_mode & VREAD)
-                       mask |= S_IRUSR;
-               if (acc_mode & VWRITE)
-                       mask |= S_IWUSR;
-               return ((file_mode & mask) == mask ? 0 : EACCES);
-       }
-
-       /* Otherwise, check the groups. */
-       error = kauth_cred_ismember_gid(cred, gid, &ismember);
-       if (error)
-               return (error);
-       if (kauth_cred_getegid(cred) == gid || ismember) {
-               if (acc_mode & VEXEC)
-                       mask |= S_IXGRP;
-               if (acc_mode & VREAD)
-                       mask |= S_IRGRP;
-               if (acc_mode & VWRITE)
-                       mask |= S_IWGRP;
-               return ((file_mode & mask) == mask ? 0 : EACCES);
-       }
-
-       /* Otherwise, check everyone else. */
-       if (acc_mode & VEXEC)
-               mask |= S_IXOTH;
-       if (acc_mode & VREAD)
-               mask |= S_IROTH;
-       if (acc_mode & VWRITE)
-               mask |= S_IWOTH;
-       return ((file_mode & mask) == mask ? 0 : EACCES);
-}
-
-/*
  * Given a file system name, look up the vfsops for that
  * file system, or return NULL if file system isn't present
  * in the kernel.
Index: sys/kern/sys_mqueue.c
===================================================================
RCS file: /usr/cvs/src/sys/kern/sys_mqueue.c,v
retrieving revision 1.16
diff -u -p -r1.16 sys_mqueue.c
--- sys/kern/sys_mqueue.c       11 Apr 2009 23:05:26 -0000      1.16
+++ sys/kern/sys_mqueue.c       20 Jun 2009 21:00:12 -0000
@@ -71,6 +71,8 @@ __KERNEL_RCSID(0, "$NetBSD: sys_mqueue.c
 #include <sys/unistd.h>
 #include <sys/vnode.h>
 
+#include <miscfs/genfs/genfs.h>
+
 /* System-wide limits. */
 static u_int                   mq_open_max = MQ_OPEN_MAX;
 static u_int                   mq_prio_max = MQ_PRIO_MAX;
@@ -183,7 +185,7 @@ mqueue_access(struct lwp *l, struct mque
        if (access & FWRITE)
                acc_mode |= VWRITE;
 
-       return vaccess(VNON, mq->mq_mode, mq->mq_euid, mq->mq_egid,
+       return genfs_can_access(VNON, mq->mq_mode, mq->mq_euid, mq->mq_egid,
            acc_mode, l->l_cred);
 }
 
Index: sys/miscfs/genfs/genfs.h
===================================================================
RCS file: /usr/cvs/src/sys/miscfs/genfs/genfs.h,v
retrieving revision 1.26
diff -u -p -r1.26 genfs.h
--- sys/miscfs/genfs/genfs.h    7 May 2009 19:30:29 -0000       1.26
+++ sys/miscfs/genfs/genfs.h    20 Jun 2009 20:51:53 -0000
@@ -36,6 +36,8 @@ int   genfs_do_putpages(struct vnode *, of
 int    genfs_renamelock_enter(struct mount *);
 void   genfs_renamelock_exit(struct mount *);
 
+int    genfs_can_access(enum vtype, mode_t, uid_t, gid_t, mode_t,
+           kauth_cred_t);
 int    genfs_can_chmod(vnode_t *, kauth_cred_t, uid_t, gid_t, mode_t);
 int    genfs_can_chown(vnode_t *, kauth_cred_t, uid_t, gid_t, uid_t, gid_t);
 int    genfs_can_mount(vnode_t *, mode_t, kauth_cred_t);
Index: sys/miscfs/genfs/genfs_vnops.c
===================================================================
RCS file: /usr/cvs/src/sys/miscfs/genfs/genfs_vnops.c,v
retrieving revision 1.171
diff -u -p -r1.171 genfs_vnops.c
--- sys/miscfs/genfs/genfs_vnops.c      7 May 2009 19:30:29 -0000       1.171
+++ sys/miscfs/genfs/genfs_vnops.c      20 Jun 2009 20:53:21 -0000
@@ -523,6 +523,66 @@ genfs_node_unlock(struct vnode *vp)
 }
 
 /*
+ * Do the usual access checking.
+ * file_mode, uid and gid are from the vnode in question,
+ * while acc_mode and cred are from the VOP_ACCESS parameter list
+ */
+int
+genfs_can_access(enum vtype type, mode_t file_mode, uid_t uid, gid_t gid,
+    mode_t acc_mode, kauth_cred_t cred)
+{
+       mode_t mask;
+       int error, ismember;
+
+       /*
+        * Super-user always gets read/write access, but execute access depends
+        * on at least one execute bit being set.
+        */
+       if (kauth_authorize_generic(cred, KAUTH_GENERIC_ISSUSER, NULL) == 0) {
+               if ((acc_mode & VEXEC) && type != VDIR &&
+                   (file_mode & (S_IXUSR|S_IXGRP|S_IXOTH)) == 0)
+                       return (EACCES);
+               return (0);
+       }
+
+       mask = 0;
+
+       /* Otherwise, check the owner. */
+       if (kauth_cred_geteuid(cred) == uid) {
+               if (acc_mode & VEXEC)
+                       mask |= S_IXUSR;
+               if (acc_mode & VREAD)
+                       mask |= S_IRUSR;
+               if (acc_mode & VWRITE)
+                       mask |= S_IWUSR;
+               return ((file_mode & mask) == mask ? 0 : EACCES);
+       }
+
+       /* Otherwise, check the groups. */
+       error = kauth_cred_ismember_gid(cred, gid, &ismember);
+       if (error)
+               return (error);
+       if (kauth_cred_getegid(cred) == gid || ismember) {
+               if (acc_mode & VEXEC)
+                       mask |= S_IXGRP;
+               if (acc_mode & VREAD)
+                       mask |= S_IRGRP;
+               if (acc_mode & VWRITE)
+                       mask |= S_IWGRP;
+               return ((file_mode & mask) == mask ? 0 : EACCES);
+       }
+
+       /* Otherwise, check everyone else. */
+       if (acc_mode & VEXEC)
+               mask |= S_IXOTH;
+       if (acc_mode & VREAD)
+               mask |= S_IROTH;
+       if (acc_mode & VWRITE)
+               mask |= S_IWOTH;
+       return ((file_mode & mask) == mask ? 0 : EACCES);
+}
+
+/*
  * Common routine to check if chmod() is allowed.
  *
  * Policy:
Index: sys/fs/adosfs/advnops.c
===================================================================
RCS file: /usr/cvs/src/sys/fs/adosfs/advnops.c,v
retrieving revision 1.33
diff -u -p -r1.33 advnops.c
--- sys/fs/adosfs/advnops.c     14 Mar 2009 21:04:23 -0000      1.33
+++ sys/fs/adosfs/advnops.c     20 Jun 2009 20:54:30 -0000
@@ -786,8 +786,9 @@ adosfs_access(void *v)
                        break;
                }
        }
-       error = vaccess(sp->a_vp->v_type, adunixprot(ap->adprot) & 
ap->amp->mask,
-           ap->uid, ap->gid, sp->a_mode, sp->a_cred);
+       error = genfs_can_access(sp->a_vp->v_type,
+           adunixprot(ap->adprot) & ap->amp->mask, ap->uid, ap->gid,
+           sp->a_mode, sp->a_cred);
 #ifdef ADOSFS_DIAGNOSTIC
        printf(" %d)", error);
 #endif
Index: sys/fs/cd9660/cd9660_vnops.c
===================================================================
RCS file: /usr/cvs/src/sys/fs/cd9660/cd9660_vnops.c,v
retrieving revision 1.36
diff -u -p -r1.36 cd9660_vnops.c
--- sys/fs/cd9660/cd9660_vnops.c        17 Dec 2008 20:51:35 -0000      1.36
+++ sys/fs/cd9660/cd9660_vnops.c        20 Jun 2009 20:54:42 -0000
@@ -116,7 +116,7 @@ cd9660_access(void *v)
                }
        }
 
-       return (vaccess(vp->v_type, ip->inode.iso_mode & ALLPERMS,
+       return (genfs_can_access(vp->v_type, ip->inode.iso_mode & ALLPERMS,
            ip->inode.iso_uid, ip->inode.iso_gid, ap->a_mode, ap->a_cred));
 }
 
Index: sys/fs/filecorefs/filecore_vnops.c
===================================================================
RCS file: /usr/cvs/src/sys/fs/filecorefs/filecore_vnops.c,v
retrieving revision 1.30
diff -u -p -r1.30 filecore_vnops.c
--- sys/fs/filecorefs/filecore_vnops.c  14 Mar 2009 21:04:23 -0000      1.30
+++ sys/fs/filecorefs/filecore_vnops.c  20 Jun 2009 20:55:03 -0000
@@ -124,7 +124,7 @@ filecore_access(void *v)
                }
        }
 
-       return (vaccess(vp->v_type, filecore_mode(ip),
+       return (genfs_can_access(vp->v_type, filecore_mode(ip),
            fcmp->fc_uid, fcmp->fc_gid, ap->a_mode, ap->a_cred));
 }
 
Index: sys/fs/msdosfs/msdosfs_vnops.c
===================================================================
RCS file: /usr/cvs/src/sys/fs/msdosfs/msdosfs_vnops.c,v
retrieving revision 1.59
diff -u -p -r1.59 msdosfs_vnops.c
--- sys/fs/msdosfs/msdosfs_vnops.c      7 May 2009 19:30:31 -0000       1.59
+++ sys/fs/msdosfs/msdosfs_vnops.c      20 Jun 2009 20:55:18 -0000
@@ -251,7 +251,7 @@ msdosfs_access(void *v)
                mode = S_IRWXU|S_IRWXG|S_IRWXO;
        else
                mode = S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH;
-       return (vaccess(ap->a_vp->v_type,
+       return (genfs_can_access(ap->a_vp->v_type,
            mode & (vp->v_type == VDIR ? pmp->pm_dirmask : pmp->pm_mask),
            pmp->pm_uid, pmp->pm_gid, ap->a_mode, ap->a_cred));
 }
Index: sys/fs/ptyfs/ptyfs_vnops.c
===================================================================
RCS file: /usr/cvs/src/sys/fs/ptyfs/ptyfs_vnops.c,v
retrieving revision 1.30
diff -u -p -r1.30 ptyfs_vnops.c
--- sys/fs/ptyfs/ptyfs_vnops.c  7 May 2009 19:30:29 -0000       1.30
+++ sys/fs/ptyfs/ptyfs_vnops.c  20 Jun 2009 20:55:35 -0000
@@ -521,7 +521,7 @@ ptyfs_access(void *v)
        if ((error = VOP_GETATTR(ap->a_vp, &va, ap->a_cred)) != 0)
                return error;
 
-       return vaccess(va.va_type, va.va_mode,
+       return genfs_can_access(va.va_type, va.va_mode,
            va.va_uid, va.va_gid, ap->a_mode, ap->a_cred);
 }
 
Index: sys/fs/smbfs/smbfs_vnops.c
===================================================================
RCS file: /usr/cvs/src/sys/fs/smbfs/smbfs_vnops.c,v
retrieving revision 1.67
diff -u -p -r1.67 smbfs_vnops.c
--- sys/fs/smbfs/smbfs_vnops.c  7 May 2009 19:30:30 -0000       1.67
+++ sys/fs/smbfs/smbfs_vnops.c  20 Jun 2009 20:55:49 -0000
@@ -197,7 +197,7 @@ smbfs_access(void *v)
                }
        }
 
-       return (vaccess(vp->v_type,
+       return (genfs_can_access(vp->v_type,
            (vp->v_type == VDIR) ? smp->sm_args.dir_mode : 
smp->sm_args.file_mode,
            smp->sm_args.uid, smp->sm_args.gid,
            acc_mode, ap->a_cred));
Index: sys/fs/sysvbfs/sysvbfs_vnops.c
===================================================================
RCS file: /usr/cvs/src/sys/fs/sysvbfs/sysvbfs_vnops.c,v
retrieving revision 1.21
diff -u -p -r1.21 sysvbfs_vnops.c
--- sys/fs/sysvbfs/sysvbfs_vnops.c      26 Nov 2008 20:17:33 -0000      1.21
+++ sys/fs/sysvbfs/sysvbfs_vnops.c      20 Jun 2009 20:56:42 -0000
@@ -45,6 +45,8 @@ __KERNEL_RCSID(0, "$NetBSD: sysvbfs_vnop
 #include <sys/kauth.h>
 #include <sys/buf.h>
 
+#include <miscfs/genfs/genfs.h>
+
 #include <fs/sysvbfs/sysvbfs.h>
 #include <fs/sysvbfs/bfs.h>
 
@@ -244,7 +246,7 @@ sysvbfs_access(void *arg)
        if ((ap->a_mode & VWRITE) && (vp->v_mount->mnt_flag & MNT_RDONLY))
                return EROFS;
 
-       return vaccess(vp->v_type, attr->mode, attr->uid, attr->gid,
+       return genfs_can_access(vp->v_type, attr->mode, attr->uid, attr->gid,
            ap->a_mode, ap->a_cred);
 }
 
Index: sys/fs/tmpfs/tmpfs_vnops.c
===================================================================
RCS file: /usr/cvs/src/sys/fs/tmpfs/tmpfs_vnops.c,v
retrieving revision 1.59
diff -u -p -r1.59 tmpfs_vnops.c
--- sys/fs/tmpfs/tmpfs_vnops.c  29 Apr 2009 11:01:50 -0000      1.59
+++ sys/fs/tmpfs/tmpfs_vnops.c  20 Jun 2009 20:56:21 -0000
@@ -54,6 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.
 #include <uvm/uvm.h>
 
 #include <miscfs/fifofs/fifo.h>
+#include <miscfs/genfs/genfs.h>
 #include <fs/tmpfs/tmpfs_vnops.h>
 #include <fs/tmpfs/tmpfs.h>
 
@@ -381,7 +382,7 @@ tmpfs_access(void *v)
                goto out;
        }
 
-       error = vaccess(vp->v_type, node->tn_mode, node->tn_uid,
+       error = genfs_can_access(vp->v_type, node->tn_mode, node->tn_uid,
            node->tn_gid, mode, cred);
 
 out:
Index: sys/fs/udf/udf_vnops.c
===================================================================
RCS file: /usr/cvs/src/sys/fs/udf/udf_vnops.c,v
retrieving revision 1.41
diff -u -p -r1.41 udf_vnops.c
--- sys/fs/udf/udf_vnops.c      7 May 2009 19:30:30 -0000       1.41
+++ sys/fs/udf/udf_vnops.c      20 Jun 2009 20:57:14 -0000
@@ -1357,8 +1357,8 @@ udf_access(void *v)
        if ((mode & VWRITE) && (flags & IMMUTABLE))
                return EPERM;
 
-       /* ask the generic vaccess to advice on security */
-       return vaccess(vp->v_type,
+       /* ask the generic genfs_can_access to advice on security */
+       return genfs_can_access(vp->v_type,
                        vap.va_mode, vap.va_uid, vap.va_gid,
                        mode, cred);
 }
Index: sys/fs/hfs/hfs_vnops.c
===================================================================
RCS file: /usr/cvs/src/sys/fs/hfs/hfs_vnops.c,v
retrieving revision 1.13
diff -u -p -r1.13 hfs_vnops.c
--- sys/fs/hfs/hfs_vnops.c      17 Dec 2008 20:51:35 -0000      1.13
+++ sys/fs/hfs/hfs_vnops.c      20 Jun 2009 20:57:34 -0000
@@ -551,7 +551,7 @@ hfs_vop_access(void *v)
        if ((error = VOP_GETATTR(ap->a_vp, &va, ap->a_cred)) != 0)
                return error;
 
-       return vaccess(va.va_type, va.va_mode, va.va_uid, va.va_gid,
+       return genfs_can_access(va.va_type, va.va_mode, va.va_uid, va.va_gid,
            ap->a_mode, ap->a_cred);
 }
 
Index: sys/fs/efs/efs_vnops.c
===================================================================
RCS file: /usr/cvs/src/sys/fs/efs/efs_vnops.c,v
retrieving revision 1.17
diff -u -p -r1.17 efs_vnops.c
--- sys/fs/efs/efs_vnops.c      1 Dec 2008 14:34:50 -0000       1.17
+++ sys/fs/efs/efs_vnops.c      20 Jun 2009 20:58:00 -0000
@@ -149,8 +149,8 @@ efs_access(void *v)
        if ((ap->a_mode & VWRITE) && (vp->v_mount->mnt_flag & MNT_RDONLY))
                return (EROFS);
 
-       return (vaccess(vp->v_type, eip->ei_mode, eip->ei_uid, eip->ei_gid,
-           ap->a_mode, ap->a_cred));
+       return (genfs_can_access(vp->v_type, eip->ei_mode, eip->ei_uid,
+           eip->ei_gid, ap->a_mode, ap->a_cred));
 }
 
 /*
Index: sys/fs/ntfs/ntfs_vnops.c
===================================================================
RCS file: /usr/cvs/src/sys/fs/ntfs/ntfs_vnops.c,v
retrieving revision 1.43
diff -u -p -r1.43 ntfs_vnops.c
--- sys/fs/ntfs/ntfs_vnops.c    29 Apr 2009 22:33:33 -0000      1.43
+++ sys/fs/ntfs/ntfs_vnops.c    20 Jun 2009 21:05:33 -0000
@@ -427,7 +427,7 @@ ntfs_access(void *v)
 
        file_mode = ip->i_mp->ntm_mode | (S_IXUSR|S_IXGRP|S_IXOTH);
 
-       return (vaccess(vp->v_type, file_mode, ip->i_mp->ntm_uid,
+       return (genfs_can_access(vp->v_type, file_mode, ip->i_mp->ntm_uid,
            ip->i_mp->ntm_gid, mode, ap->a_cred));
 }
 
Index: sys/miscfs/kernfs/kernfs_vnops.c
===================================================================
RCS file: /usr/cvs/src/sys/miscfs/kernfs/kernfs_vnops.c,v
retrieving revision 1.136
diff -u -p -r1.136 kernfs_vnops.c
--- sys/miscfs/kernfs/kernfs_vnops.c    14 Mar 2009 15:36:22 -0000      1.136
+++ sys/miscfs/kernfs/kernfs_vnops.c    20 Jun 2009 20:59:51 -0000
@@ -777,7 +777,7 @@ kernfs_access(void *v)
        if ((error = VOP_GETATTR(ap->a_vp, &va, ap->a_cred)) != 0)
                return (error);
 
-       return (vaccess(va.va_type, va.va_mode, va.va_uid, va.va_gid,
+       return (genfs_can_access(va.va_type, va.va_mode, va.va_uid, va.va_gid,
            ap->a_mode, ap->a_cred));
 }
 
Index: sys/miscfs/procfs/procfs_vnops.c
===================================================================
RCS file: /usr/cvs/src/sys/miscfs/procfs/procfs_vnops.c,v
retrieving revision 1.173
diff -u -p -r1.173 procfs_vnops.c
--- sys/miscfs/procfs/procfs_vnops.c    17 Dec 2008 20:51:36 -0000      1.173
+++ sys/miscfs/procfs/procfs_vnops.c    20 Jun 2009 20:59:29 -0000
@@ -932,7 +932,7 @@ procfs_access(void *v)
        if ((error = VOP_GETATTR(ap->a_vp, &va, ap->a_cred)) != 0)
                return (error);
 
-       return (vaccess(va.va_type, va.va_mode,
+       return (genfs_can_access(va.va_type, va.va_mode,
            va.va_uid, va.va_gid, ap->a_mode, ap->a_cred));
 }
 
Index: sys/nfs/nfs_vnops.c
===================================================================
RCS file: /usr/cvs/src/sys/nfs/nfs_vnops.c,v
retrieving revision 1.276
diff -u -p -r1.276 nfs_vnops.c
--- sys/nfs/nfs_vnops.c 4 May 2009 05:59:35 -0000       1.276
+++ sys/nfs/nfs_vnops.c 20 Jun 2009 20:59:10 -0000
@@ -3407,7 +3407,7 @@ nfsspec_access(void *v)
                }
        }
 
-       return (vaccess(va.va_type, va.va_mode,
+       return (genfs_can_access(va.va_type, va.va_mode,
            va.va_uid, va.va_gid, ap->a_mode, ap->a_cred));
 }
 
Index: sys/ufs/ext2fs/ext2fs_vnops.c
===================================================================
RCS file: /usr/cvs/src/sys/ufs/ext2fs/ext2fs_vnops.c,v
retrieving revision 1.86
diff -u -p -r1.86 ext2fs_vnops.c
--- sys/ufs/ext2fs/ext2fs_vnops.c       7 May 2009 19:30:30 -0000       1.86
+++ sys/ufs/ext2fs/ext2fs_vnops.c       20 Jun 2009 20:58:46 -0000
@@ -258,7 +258,7 @@ ext2fs_access(void *v)
        if ((mode & VWRITE) && (ip->i_e2fs_flags & EXT2_IMMUTABLE))
                return (EPERM);
 
-       return (vaccess(vp->v_type, ip->i_e2fs_mode & ALLPERMS,
+       return (genfs_can_access(vp->v_type, ip->i_e2fs_mode & ALLPERMS,
                        ip->i_uid, ip->i_gid, mode, ap->a_cred));
 }
 
Index: sys/ufs/ufs/ufs_vnops.c
===================================================================
RCS file: /usr/cvs/src/sys/ufs/ufs/ufs_vnops.c,v
retrieving revision 1.177
diff -u -p -r1.177 ufs_vnops.c
--- sys/ufs/ufs/ufs_vnops.c     8 May 2009 10:52:00 -0000       1.177
+++ sys/ufs/ufs/ufs_vnops.c     20 Jun 2009 20:58:37 -0000
@@ -328,7 +328,7 @@ ufs_access(void *v)
        if ((mode & VWRITE) && (ip->i_flags & IMMUTABLE))
                return (EPERM);
 
-       return (vaccess(vp->v_type, ip->i_mode & ALLPERMS,
+       return (genfs_can_access(vp->v_type, ip->i_mode & ALLPERMS,
                ip->i_uid, ip->i_gid, mode, ap->a_cred));
 }
 


Home | Main Index | Thread Index | Old Index