diff options
| author | James Morris <jmorris@namei.org> | 2011-08-30 00:17:34 -0400 |
|---|---|---|
| committer | Eric Paris <eparis@redhat.com> | 2012-01-05 18:52:50 -0500 |
| commit | e8a65a3f67f8a85802c0a0250e48c4c4652d0da0 (patch) | |
| tree | 4f9b55cac61209b6b4f15a1e20396a15a4444b11 /security | |
| parent | 6063c0461b947c26a77674f33a3409eb99e15d2f (diff) | |
selinux: sparse fix: eliminate warnings for selinuxfs
Fixes several sparse warnings for selinuxfs.c
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'security')
| -rw-r--r-- | security/selinux/hooks.c | 5 | ||||
| -rw-r--r-- | security/selinux/include/security.h | 3 | ||||
| -rw-r--r-- | security/selinux/selinuxfs.c | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index e07cf7fcdce2..4a176b468719 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
| @@ -2097,9 +2097,6 @@ static int selinux_bprm_secureexec(struct linux_binprm *bprm) | |||
| 2097 | return (atsecure || cap_bprm_secureexec(bprm)); | 2097 | return (atsecure || cap_bprm_secureexec(bprm)); |
| 2098 | } | 2098 | } |
| 2099 | 2099 | ||
| 2100 | extern struct vfsmount *selinuxfs_mount; | ||
| 2101 | extern struct dentry *selinux_null; | ||
| 2102 | |||
| 2103 | /* Derived from fs/exec.c:flush_old_files. */ | 2100 | /* Derived from fs/exec.c:flush_old_files. */ |
| 2104 | static inline void flush_unauthorized_files(const struct cred *cred, | 2101 | static inline void flush_unauthorized_files(const struct cred *cred, |
| 2105 | struct files_struct *files) | 2102 | struct files_struct *files) |
| @@ -5803,8 +5800,6 @@ static int selinux_disabled; | |||
| 5803 | 5800 | ||
| 5804 | int selinux_disable(void) | 5801 | int selinux_disable(void) |
| 5805 | { | 5802 | { |
| 5806 | extern void exit_sel_fs(void); | ||
| 5807 | |||
| 5808 | if (ss_initialized) { | 5803 | if (ss_initialized) { |
| 5809 | /* Not permitted after initial policy load. */ | 5804 | /* Not permitted after initial policy load. */ |
| 5810 | return -EINVAL; | 5805 | return -EINVAL; |
diff --git a/security/selinux/include/security.h b/security/selinux/include/security.h index 30002c43436f..13b626352f0b 100644 --- a/security/selinux/include/security.h +++ b/security/selinux/include/security.h | |||
| @@ -218,6 +218,9 @@ extern void selinux_status_update_setenforce(int enforcing); | |||
| 218 | extern void selinux_status_update_policyload(int seqno); | 218 | extern void selinux_status_update_policyload(int seqno); |
| 219 | extern void selinux_complete_init(void); | 219 | extern void selinux_complete_init(void); |
| 220 | extern int selinux_disable(void); | 220 | extern int selinux_disable(void); |
| 221 | extern void exit_sel_fs(void); | ||
| 222 | extern struct dentry *selinux_null; | ||
| 223 | extern struct vfsmount *selinuxfs_mount; | ||
| 221 | 224 | ||
| 222 | #endif /* _SELINUX_SECURITY_H_ */ | 225 | #endif /* _SELINUX_SECURITY_H_ */ |
| 223 | 226 | ||
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index d3677c6c12c6..ba2ada5f16a9 100644 --- a/security/selinux/selinuxfs.c +++ b/security/selinux/selinuxfs.c | |||
| @@ -477,7 +477,7 @@ static struct vm_operations_struct sel_mmap_policy_ops = { | |||
| 477 | .page_mkwrite = sel_mmap_policy_fault, | 477 | .page_mkwrite = sel_mmap_policy_fault, |
| 478 | }; | 478 | }; |
| 479 | 479 | ||
| 480 | int sel_mmap_policy(struct file *filp, struct vm_area_struct *vma) | 480 | static int sel_mmap_policy(struct file *filp, struct vm_area_struct *vma) |
| 481 | { | 481 | { |
| 482 | if (vma->vm_flags & VM_SHARED) { | 482 | if (vma->vm_flags & VM_SHARED) { |
| 483 | /* do not allow mprotect to make mapping writable */ | 483 | /* do not allow mprotect to make mapping writable */ |
