When calling extattr_check_cred, use V{READ,WRITE}, not I{READ,WRITE}.
Approved by: rwatson (mentor)
This commit is contained in:
parent
9d965219e4
commit
86a0c0aa7b
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user