diff options
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 04acb5af8317..047365ac9faa 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -2619,7 +2619,7 @@ static int selinux_inode_getattr(struct vfsmount *mnt, struct dentry *dentry) | |||
2619 | return dentry_has_perm(current, mnt, dentry, FILE__GETATTR); | 2619 | return dentry_has_perm(current, mnt, dentry, FILE__GETATTR); |
2620 | } | 2620 | } |
2621 | 2621 | ||
2622 | static int selinux_inode_setotherxattr(struct dentry *dentry, char *name) | 2622 | static int selinux_inode_setotherxattr(struct dentry *dentry, const char *name) |
2623 | { | 2623 | { |
2624 | if (!strncmp(name, XATTR_SECURITY_PREFIX, | 2624 | if (!strncmp(name, XATTR_SECURITY_PREFIX, |
2625 | sizeof XATTR_SECURITY_PREFIX - 1)) { | 2625 | sizeof XATTR_SECURITY_PREFIX - 1)) { |
@@ -2638,7 +2638,8 @@ static int selinux_inode_setotherxattr(struct dentry *dentry, char *name) | |||
2638 | return dentry_has_perm(current, NULL, dentry, FILE__SETATTR); | 2638 | return dentry_has_perm(current, NULL, dentry, FILE__SETATTR); |
2639 | } | 2639 | } |
2640 | 2640 | ||
2641 | static int selinux_inode_setxattr(struct dentry *dentry, char *name, void *value, size_t size, int flags) | 2641 | static int selinux_inode_setxattr(struct dentry *dentry, const char *name, |
2642 | const void *value, size_t size, int flags) | ||
2642 | { | 2643 | { |
2643 | struct task_security_struct *tsec = current->security; | 2644 | struct task_security_struct *tsec = current->security; |
2644 | struct inode *inode = dentry->d_inode; | 2645 | struct inode *inode = dentry->d_inode; |
@@ -2687,8 +2688,9 @@ static int selinux_inode_setxattr(struct dentry *dentry, char *name, void *value | |||
2687 | &ad); | 2688 | &ad); |
2688 | } | 2689 | } |
2689 | 2690 | ||
2690 | static void selinux_inode_post_setxattr(struct dentry *dentry, char *name, | 2691 | static void selinux_inode_post_setxattr(struct dentry *dentry, const char *name, |
2691 | void *value, size_t size, int flags) | 2692 | const void *value, size_t size, |
2693 | int flags) | ||
2692 | { | 2694 | { |
2693 | struct inode *inode = dentry->d_inode; | 2695 | struct inode *inode = dentry->d_inode; |
2694 | struct inode_security_struct *isec = inode->i_security; | 2696 | struct inode_security_struct *isec = inode->i_security; |
@@ -2711,7 +2713,7 @@ static void selinux_inode_post_setxattr(struct dentry *dentry, char *name, | |||
2711 | return; | 2713 | return; |
2712 | } | 2714 | } |
2713 | 2715 | ||
2714 | static int selinux_inode_getxattr(struct dentry *dentry, char *name) | 2716 | static int selinux_inode_getxattr(struct dentry *dentry, const char *name) |
2715 | { | 2717 | { |
2716 | return dentry_has_perm(current, NULL, dentry, FILE__GETATTR); | 2718 | return dentry_has_perm(current, NULL, dentry, FILE__GETATTR); |
2717 | } | 2719 | } |
@@ -2721,7 +2723,7 @@ static int selinux_inode_listxattr(struct dentry *dentry) | |||
2721 | return dentry_has_perm(current, NULL, dentry, FILE__GETATTR); | 2723 | return dentry_has_perm(current, NULL, dentry, FILE__GETATTR); |
2722 | } | 2724 | } |
2723 | 2725 | ||
2724 | static int selinux_inode_removexattr(struct dentry *dentry, char *name) | 2726 | static int selinux_inode_removexattr(struct dentry *dentry, const char *name) |
2725 | { | 2727 | { |
2726 | if (strcmp(name, XATTR_NAME_SELINUX)) | 2728 | if (strcmp(name, XATTR_NAME_SELINUX)) |
2727 | return selinux_inode_setotherxattr(dentry, name); | 2729 | return selinux_inode_setotherxattr(dentry, name); |