You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'iov_iter' into for-next
This commit is contained in:
@@ -319,9 +319,12 @@ int evm_inode_setxattr(struct dentry *dentry, const char *xattr_name,
|
||||
{
|
||||
const struct evm_ima_xattr_data *xattr_data = xattr_value;
|
||||
|
||||
if ((strcmp(xattr_name, XATTR_NAME_EVM) == 0)
|
||||
&& (xattr_data->type == EVM_XATTR_HMAC))
|
||||
return -EPERM;
|
||||
if (strcmp(xattr_name, XATTR_NAME_EVM) == 0) {
|
||||
if (!xattr_value_len)
|
||||
return -EINVAL;
|
||||
if (xattr_data->type != EVM_IMA_XATTR_DIGSIG)
|
||||
return -EPERM;
|
||||
}
|
||||
return evm_protect_xattr(dentry, xattr_name, xattr_value,
|
||||
xattr_value_len);
|
||||
}
|
||||
|
||||
@@ -378,6 +378,8 @@ int ima_inode_setxattr(struct dentry *dentry, const char *xattr_name,
|
||||
result = ima_protect_xattr(dentry, xattr_name, xattr_value,
|
||||
xattr_value_len);
|
||||
if (result == 1) {
|
||||
if (!xattr_value_len || (xvalue->type >= IMA_XATTR_LAST))
|
||||
return -EINVAL;
|
||||
ima_reset_appraise_flags(dentry->d_inode,
|
||||
(xvalue->type == EVM_IMA_XATTR_DIGSIG) ? 1 : 0);
|
||||
result = 0;
|
||||
|
||||
@@ -61,6 +61,7 @@ enum evm_ima_xattr_type {
|
||||
EVM_XATTR_HMAC,
|
||||
EVM_IMA_XATTR_DIGSIG,
|
||||
IMA_XATTR_DIGEST_NG,
|
||||
IMA_XATTR_LAST
|
||||
};
|
||||
|
||||
struct evm_ima_xattr_data {
|
||||
|
||||
@@ -4725,9 +4725,10 @@ static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb)
|
||||
err = selinux_nlmsg_lookup(sksec->sclass, nlh->nlmsg_type, &perm);
|
||||
if (err) {
|
||||
if (err == -EINVAL) {
|
||||
WARN_ONCE(1, "selinux_nlmsg_perm: unrecognized netlink message:"
|
||||
" protocol=%hu nlmsg_type=%hu sclass=%hu\n",
|
||||
sk->sk_protocol, nlh->nlmsg_type, sksec->sclass);
|
||||
printk(KERN_WARNING
|
||||
"SELinux: unrecognized netlink message:"
|
||||
" protocol=%hu nlmsg_type=%hu sclass=%hu\n",
|
||||
sk->sk_protocol, nlh->nlmsg_type, sksec->sclass);
|
||||
if (!selinux_enforcing || security_get_allow_unknown())
|
||||
err = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user