diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-04-11 00:48:00 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-04-11 00:48:00 -0400 |
commit | ce23e640133484eebc20ca7b7668388213e11327 (patch) | |
tree | 0b37de221fe6790396c3ae636bc56e5aacbcaf46 /security/selinux/hooks.c | |
parent | b296821a7c42fa58baa17513b2b7b30ae66f3336 (diff) |
->getxattr(): pass dentry and inode as separate arguments
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 889cd59ca5a7..469f5c75bd4b 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -506,7 +506,8 @@ static int sb_finish_set_opts(struct super_block *sb) | |||
506 | rc = -EOPNOTSUPP; | 506 | rc = -EOPNOTSUPP; |
507 | goto out; | 507 | goto out; |
508 | } | 508 | } |
509 | rc = root_inode->i_op->getxattr(root, XATTR_NAME_SELINUX, NULL, 0); | 509 | rc = root_inode->i_op->getxattr(root, root_inode, |
510 | XATTR_NAME_SELINUX, NULL, 0); | ||
510 | if (rc < 0 && rc != -ENODATA) { | 511 | if (rc < 0 && rc != -ENODATA) { |
511 | if (rc == -EOPNOTSUPP) | 512 | if (rc == -EOPNOTSUPP) |
512 | printk(KERN_WARNING "SELinux: (dev %s, type " | 513 | printk(KERN_WARNING "SELinux: (dev %s, type " |
@@ -1412,13 +1413,13 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent | |||
1412 | goto out_unlock; | 1413 | goto out_unlock; |
1413 | } | 1414 | } |
1414 | context[len] = '\0'; | 1415 | context[len] = '\0'; |
1415 | rc = inode->i_op->getxattr(dentry, XATTR_NAME_SELINUX, | 1416 | rc = inode->i_op->getxattr(dentry, inode, XATTR_NAME_SELINUX, |
1416 | context, len); | 1417 | context, len); |
1417 | if (rc == -ERANGE) { | 1418 | if (rc == -ERANGE) { |
1418 | kfree(context); | 1419 | kfree(context); |
1419 | 1420 | ||
1420 | /* Need a larger buffer. Query for the right size. */ | 1421 | /* Need a larger buffer. Query for the right size. */ |
1421 | rc = inode->i_op->getxattr(dentry, XATTR_NAME_SELINUX, | 1422 | rc = inode->i_op->getxattr(dentry, inode, XATTR_NAME_SELINUX, |
1422 | NULL, 0); | 1423 | NULL, 0); |
1423 | if (rc < 0) { | 1424 | if (rc < 0) { |
1424 | dput(dentry); | 1425 | dput(dentry); |
@@ -1432,7 +1433,7 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent | |||
1432 | goto out_unlock; | 1433 | goto out_unlock; |
1433 | } | 1434 | } |
1434 | context[len] = '\0'; | 1435 | context[len] = '\0'; |
1435 | rc = inode->i_op->getxattr(dentry, | 1436 | rc = inode->i_op->getxattr(dentry, inode, |
1436 | XATTR_NAME_SELINUX, | 1437 | XATTR_NAME_SELINUX, |
1437 | context, len); | 1438 | context, len); |
1438 | } | 1439 | } |