diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2015-12-24 11:09:39 -0500 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2015-12-24 11:09:39 -0500 |
commit | d6335d77a7622a88380f3f207cc1f727f878dd21 (patch) | |
tree | 4333468b8ce63aba39de0c37ed1214f0bdb22b9f /kernel/auditsc.c | |
parent | ea861dfd9e0e7e044a6e65fa02a14b9159b568da (diff) |
security: Make inode argument of inode_getsecid non-const
Make the inode argument of the inode_getsecid hook non-const so that we
can use it to revalidate invalid security labels.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r-- | kernel/auditsc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index b86cc04959de..195ffaee50b9 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -1754,7 +1754,7 @@ void __audit_inode(struct filename *name, const struct dentry *dentry, | |||
1754 | unsigned int flags) | 1754 | unsigned int flags) |
1755 | { | 1755 | { |
1756 | struct audit_context *context = current->audit_context; | 1756 | struct audit_context *context = current->audit_context; |
1757 | const struct inode *inode = d_backing_inode(dentry); | 1757 | struct inode *inode = d_backing_inode(dentry); |
1758 | struct audit_names *n; | 1758 | struct audit_names *n; |
1759 | bool parent = flags & AUDIT_INODE_PARENT; | 1759 | bool parent = flags & AUDIT_INODE_PARENT; |
1760 | 1760 | ||
@@ -1848,12 +1848,12 @@ void __audit_file(const struct file *file) | |||
1848 | * must be hooked prior, in order to capture the target inode during | 1848 | * must be hooked prior, in order to capture the target inode during |
1849 | * unsuccessful attempts. | 1849 | * unsuccessful attempts. |
1850 | */ | 1850 | */ |
1851 | void __audit_inode_child(const struct inode *parent, | 1851 | void __audit_inode_child(struct inode *parent, |
1852 | const struct dentry *dentry, | 1852 | const struct dentry *dentry, |
1853 | const unsigned char type) | 1853 | const unsigned char type) |
1854 | { | 1854 | { |
1855 | struct audit_context *context = current->audit_context; | 1855 | struct audit_context *context = current->audit_context; |
1856 | const struct inode *inode = d_backing_inode(dentry); | 1856 | struct inode *inode = d_backing_inode(dentry); |
1857 | const char *dname = dentry->d_name.name; | 1857 | const char *dname = dentry->d_name.name; |
1858 | struct audit_names *n, *found_parent = NULL, *found_child = NULL; | 1858 | struct audit_names *n, *found_parent = NULL, *found_child = NULL; |
1859 | 1859 | ||