tech-kern archive

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

efs misusing FREAD?



Hi,

Looking at the efs code, I've noticed that it's the only file-system
that passes FREAD to VOP_ACCESS(), where all others pass VREAD (or
VWRITE, for that matter). vaccess() also expects the "V" values.

Is the attached diff okay? (couldn't use "mode" as it's used later
on)

Thanks,

-e.
Index: efs_vfsops.c
===================================================================
RCS file: /usr/cvs/src/sys/fs/efs/efs_vfsops.c,v
retrieving revision 1.17
diff -u -p -r1.17 efs_vfsops.c
--- efs_vfsops.c        1 Dec 2008 14:34:50 -0000       1.17
+++ efs_vfsops.c        20 Apr 2009 02:59:54 -0000
@@ -214,7 +214,7 @@ efs_mount(struct mount *mp, const char *
         * permissions on the device.
         */
        if (kauth_authorize_generic(l->l_cred, KAUTH_GENERIC_ISSUSER, NULL)) {
-               err = VOP_ACCESS(devvp, mode, l->l_cred);
+               err = VOP_ACCESS(devvp, VREAD, l->l_cred);
                if (err) {
                        vput(devvp);
                        return (err);


Home | Main Index | Thread Index | Old Index