Skip to content

Commit

Permalink
evm: fix security/security_old_init_security return code
Browse files Browse the repository at this point in the history
security_inode_init_security previously returned -EOPNOTSUPP, for S_PRIVATE
inodes, and relied on the callers to change it to 0.  As the callers do not
change the return code anymore, return 0, intead of -EOPNOTSUPP.

Signed-off-by: Mimi Zohar <[email protected]>
  • Loading branch information
Mimi Zohar committed Sep 14, 2011
1 parent 1d71405 commit fb88c2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions security/security.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ int security_inode_init_security(struct inode *inode, struct inode *dir,
int ret;

if (unlikely(IS_PRIVATE(inode)))
return -EOPNOTSUPP;
return 0;

memset(new_xattrs, 0, sizeof new_xattrs);
if (!initxattrs)
Expand Down Expand Up @@ -381,7 +381,7 @@ int security_old_inode_init_security(struct inode *inode, struct inode *dir,
void **value, size_t *len)
{
if (unlikely(IS_PRIVATE(inode)))
return -EOPNOTSUPP;
return 0;
return security_ops->inode_init_security(inode, dir, qstr, name, value,
len);
}
Expand Down

0 comments on commit fb88c2b

Please sign in to comment.