When calling extattr_check_cred, use V{READ,WRITE}, not I{READ,WRITE}.

Approved by:	rwatson (mentor)
This commit is contained in:
trasz 2008-09-03 12:46:09 +00:00
parent 80c32815b9
commit 88f6f49133
2 changed files with 7 additions and 7 deletions

View File

@ -1409,7 +1409,7 @@ vop_deleteextattr {
return (EROFS); return (EROFS);
error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, 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 (error) {
if (ip->i_ea_area != NULL && ip->i_ea_error == 0) if (ip->i_ea_area != NULL && ip->i_ea_error == 0)
ip->i_ea_error = error; ip->i_ea_error = error;
@ -1493,7 +1493,7 @@ vop_getextattr {
return (EOPNOTSUPP); return (EOPNOTSUPP);
error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, 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) if (error)
return (error); return (error);
@ -1553,7 +1553,7 @@ vop_listextattr {
return (EOPNOTSUPP); return (EOPNOTSUPP);
error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, 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) if (error)
return (error); return (error);
@ -1633,7 +1633,7 @@ vop_setextattr {
return (EROFS); return (EROFS);
error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, 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 (error) {
if (ip->i_ea_area != NULL && ip->i_ea_error == 0) if (ip->i_ea_area != NULL && ip->i_ea_error == 0)
ip->i_ea_error = error; ip->i_ea_error = error;

View File

@ -847,7 +847,7 @@ ufs_extattr_get(struct vnode *vp, int attrnamespace, const char *name,
if (strlen(name) == 0) if (strlen(name) == 0)
return (EINVAL); return (EINVAL);
error = extattr_check_cred(vp, attrnamespace, cred, td, IREAD); error = extattr_check_cred(vp, attrnamespace, cred, td, VREAD);
if (error) if (error)
return (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)) if (!ufs_extattr_valid_attrname(attrnamespace, name))
return (EINVAL); return (EINVAL);
error = extattr_check_cred(vp, attrnamespace, cred, td, IWRITE); error = extattr_check_cred(vp, attrnamespace, cred, td, VWRITE);
if (error) if (error)
return (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)) if (!ufs_extattr_valid_attrname(attrnamespace, name))
return (EINVAL); return (EINVAL);
error = extattr_check_cred(vp, attrnamespace, cred, td, IWRITE); error = extattr_check_cred(vp, attrnamespace, cred, td, VWRITE);
if (error) if (error)
return (error); return (error);