Commit f5db4b31 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security

Pull LSM regression fix from James Morris.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
  LSM: restore certain default error codes
parents f045fd75 e308fd3b
...@@ -380,8 +380,8 @@ int security_inode_init_security(struct inode *inode, struct inode *dir, ...@@ -380,8 +380,8 @@ int security_inode_init_security(struct inode *inode, struct inode *dir,
return 0; return 0;
if (!initxattrs) if (!initxattrs)
return call_int_hook(inode_init_security, 0, inode, dir, qstr, return call_int_hook(inode_init_security, -EOPNOTSUPP, inode,
NULL, NULL, NULL); dir, qstr, NULL, NULL, NULL);
memset(new_xattrs, 0, sizeof(new_xattrs)); memset(new_xattrs, 0, sizeof(new_xattrs));
lsm_xattr = new_xattrs; lsm_xattr = new_xattrs;
ret = call_int_hook(inode_init_security, -EOPNOTSUPP, inode, dir, qstr, ret = call_int_hook(inode_init_security, -EOPNOTSUPP, inode, dir, qstr,
...@@ -409,8 +409,8 @@ int security_old_inode_init_security(struct inode *inode, struct inode *dir, ...@@ -409,8 +409,8 @@ int security_old_inode_init_security(struct inode *inode, struct inode *dir,
{ {
if (unlikely(IS_PRIVATE(inode))) if (unlikely(IS_PRIVATE(inode)))
return -EOPNOTSUPP; return -EOPNOTSUPP;
return call_int_hook(inode_init_security, 0, inode, dir, qstr, return call_int_hook(inode_init_security, -EOPNOTSUPP, inode, dir,
name, value, len); qstr, name, value, len);
} }
EXPORT_SYMBOL(security_old_inode_init_security); EXPORT_SYMBOL(security_old_inode_init_security);
...@@ -1281,7 +1281,8 @@ int security_socket_getpeersec_stream(struct socket *sock, char __user *optval, ...@@ -1281,7 +1281,8 @@ int security_socket_getpeersec_stream(struct socket *sock, char __user *optval,
int security_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, u32 *secid) int security_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, u32 *secid)
{ {
return call_int_hook(socket_getpeersec_dgram, 0, sock, skb, secid); return call_int_hook(socket_getpeersec_dgram, -ENOPROTOOPT, sock,
skb, secid);
} }
EXPORT_SYMBOL(security_socket_getpeersec_dgram); EXPORT_SYMBOL(security_socket_getpeersec_dgram);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment