mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[PATCH] Miscellaneous bug and warning fixes
This patch fixes a couple of bugs revealed in new features recently added to -mm1: * fixes warnings due to inconsistent use of const struct inode *inode * fixes bug that prevent a kernel from booting with audit on, and SELinux off due to a missing function in security/dummy.c * fixes a bug that throws spurious audit_panic() messages due to a missing return just before an error_path label * some reasonable house cleaning in audit_ipc_context(), audit_inode_context(), and audit_log_task_context() Signed-off-by: Dustin Kirkland <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
This commit is contained in:
parent
8c8570fb8f
commit
7306a0b9b3
4 changed files with 24 additions and 15 deletions
|
|
@ -378,7 +378,7 @@ static int dummy_inode_removexattr (struct dentry *dentry, char *name)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int dummy_inode_getsecurity(struct inode *inode, const char *name, void *buffer, size_t size, int err)
|
||||
static int dummy_inode_getsecurity(const struct inode *inode, const char *name, void *buffer, size_t size, int err)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
|
@ -393,6 +393,11 @@ static int dummy_inode_listsecurity(struct inode *inode, char *buffer, size_t bu
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const char *dummy_inode_xattr_getsuffix(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int dummy_file_permission (struct file *file, int mask)
|
||||
{
|
||||
return 0;
|
||||
|
|
@ -930,6 +935,7 @@ void security_fixup_ops (struct security_operations *ops)
|
|||
set_to_dummy_if_null(ops, inode_getxattr);
|
||||
set_to_dummy_if_null(ops, inode_listxattr);
|
||||
set_to_dummy_if_null(ops, inode_removexattr);
|
||||
set_to_dummy_if_null(ops, inode_xattr_getsuffix);
|
||||
set_to_dummy_if_null(ops, inode_getsecurity);
|
||||
set_to_dummy_if_null(ops, inode_setsecurity);
|
||||
set_to_dummy_if_null(ops, inode_listsecurity);
|
||||
|
|
|
|||
|
|
@ -2247,7 +2247,7 @@ static const char *selinux_inode_xattr_getsuffix(void)
|
|||
*
|
||||
* Permission check is handled by selinux_inode_getxattr hook.
|
||||
*/
|
||||
static int selinux_inode_getsecurity(struct inode *inode, const char *name, void *buffer, size_t size, int err)
|
||||
static int selinux_inode_getsecurity(const struct inode *inode, const char *name, void *buffer, size_t size, int err)
|
||||
{
|
||||
struct inode_security_struct *isec = inode->i_security;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue