mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Merge branch 'next-evm' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/ima-2.6 into next
Conflicts: fs/attr.c Resolve conflict manually. Signed-off-by: James Morris <[email protected]>
This commit is contained in:
commit
5a2f3a02ae
39 changed files with 1535 additions and 405 deletions
|
|
@ -46,26 +46,28 @@ ext2_xattr_security_set(struct dentry *dentry, const char *name,
|
|||
value, size, flags);
|
||||
}
|
||||
|
||||
int ext2_initxattrs(struct inode *inode, const struct xattr *xattr_array,
|
||||
void *fs_info)
|
||||
{
|
||||
const struct xattr *xattr;
|
||||
int err = 0;
|
||||
|
||||
for (xattr = xattr_array; xattr->name != NULL; xattr++) {
|
||||
err = ext2_xattr_set(inode, EXT2_XATTR_INDEX_SECURITY,
|
||||
xattr->name, xattr->value,
|
||||
xattr->value_len, 0);
|
||||
if (err < 0)
|
||||
break;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
int
|
||||
ext2_init_security(struct inode *inode, struct inode *dir,
|
||||
const struct qstr *qstr)
|
||||
{
|
||||
int err;
|
||||
size_t len;
|
||||
void *value;
|
||||
char *name;
|
||||
|
||||
err = security_inode_init_security(inode, dir, qstr, &name, &value, &len);
|
||||
if (err) {
|
||||
if (err == -EOPNOTSUPP)
|
||||
return 0;
|
||||
return err;
|
||||
}
|
||||
err = ext2_xattr_set(inode, EXT2_XATTR_INDEX_SECURITY,
|
||||
name, value, len, 0);
|
||||
kfree(name);
|
||||
kfree(value);
|
||||
return err;
|
||||
return security_inode_init_security(inode, dir, qstr,
|
||||
&ext2_initxattrs, NULL);
|
||||
}
|
||||
|
||||
const struct xattr_handler ext2_xattr_security_handler = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue