From 86a0c0aa7b8e845e04e7d96c2379502f284b7b16 Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Wed, 3 Sep 2008 12:46:09 +0000 Subject: [PATCH] When calling extattr_check_cred, use V{READ,WRITE}, not I{READ,WRITE}. Approved by: rwatson (mentor) --- sys/ufs/ffs/ffs_vnops.c | 8 ++++---- sys/ufs/ufs/ufs_extattr.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 9a4cb2d0330..7b1af286829 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -1409,7 +1409,7 @@ vop_deleteextattr { return (EROFS); error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, - ap->a_cred, ap->a_td, IWRITE); + ap->a_cred, ap->a_td, VWRITE); if (error) { if (ip->i_ea_area != NULL && ip->i_ea_error == 0) ip->i_ea_error = error; @@ -1493,7 +1493,7 @@ vop_getextattr { return (EOPNOTSUPP); error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, - ap->a_cred, ap->a_td, IREAD); + ap->a_cred, ap->a_td, VREAD); if (error) return (error); @@ -1553,7 +1553,7 @@ vop_listextattr { return (EOPNOTSUPP); error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, - ap->a_cred, ap->a_td, IREAD); + ap->a_cred, ap->a_td, VREAD); if (error) return (error); @@ -1633,7 +1633,7 @@ vop_setextattr { return (EROFS); error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, - ap->a_cred, ap->a_td, IWRITE); + ap->a_cred, ap->a_td, VWRITE); if (error) { if (ip->i_ea_area != NULL && ip->i_ea_error == 0) ip->i_ea_error = error; diff --git a/sys/ufs/ufs/ufs_extattr.c b/sys/ufs/ufs/ufs_extattr.c index dcfd7d912e9..f034e2bf639 100644 --- a/sys/ufs/ufs/ufs_extattr.c +++ b/sys/ufs/ufs/ufs_extattr.c @@ -847,7 +847,7 @@ ufs_extattr_get(struct vnode *vp, int attrnamespace, const char *name, if (strlen(name) == 0) return (EINVAL); - error = extattr_check_cred(vp, attrnamespace, cred, td, IREAD); + error = extattr_check_cred(vp, attrnamespace, cred, td, VREAD); if (error) return (error); @@ -1054,7 +1054,7 @@ ufs_extattr_set(struct vnode *vp, int attrnamespace, const char *name, if (!ufs_extattr_valid_attrname(attrnamespace, name)) return (EINVAL); - error = extattr_check_cred(vp, attrnamespace, cred, td, IWRITE); + error = extattr_check_cred(vp, attrnamespace, cred, td, VWRITE); if (error) return (error); @@ -1162,7 +1162,7 @@ ufs_extattr_rm(struct vnode *vp, int attrnamespace, const char *name, if (!ufs_extattr_valid_attrname(attrnamespace, name)) return (EINVAL); - error = extattr_check_cred(vp, attrnamespace, cred, td, IWRITE); + error = extattr_check_cred(vp, attrnamespace, cred, td, VWRITE); if (error) return (error); -- 2.45.2