Commit ad3fa08c authored by James Morris's avatar James Morris

selinux: sparse fix: eliminate warnings for selinuxfs

Fixes several sparse warnings for selinuxfs.c
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
parent d5813a57
...@@ -2097,9 +2097,6 @@ static int selinux_bprm_secureexec(struct linux_binprm *bprm) ...@@ -2097,9 +2097,6 @@ static int selinux_bprm_secureexec(struct linux_binprm *bprm)
return (atsecure || cap_bprm_secureexec(bprm)); return (atsecure || cap_bprm_secureexec(bprm));
} }
extern struct vfsmount *selinuxfs_mount;
extern struct dentry *selinux_null;
/* Derived from fs/exec.c:flush_old_files. */ /* Derived from fs/exec.c:flush_old_files. */
static inline void flush_unauthorized_files(const struct cred *cred, static inline void flush_unauthorized_files(const struct cred *cred,
struct files_struct *files) struct files_struct *files)
...@@ -5803,8 +5800,6 @@ static int selinux_disabled; ...@@ -5803,8 +5800,6 @@ static int selinux_disabled;
int selinux_disable(void) int selinux_disable(void)
{ {
extern void exit_sel_fs(void);
if (ss_initialized) { if (ss_initialized) {
/* Not permitted after initial policy load. */ /* Not permitted after initial policy load. */
return -EINVAL; return -EINVAL;
......
...@@ -218,6 +218,9 @@ extern void selinux_status_update_setenforce(int enforcing); ...@@ -218,6 +218,9 @@ extern void selinux_status_update_setenforce(int enforcing);
extern void selinux_status_update_policyload(int seqno); extern void selinux_status_update_policyload(int seqno);
extern void selinux_complete_init(void); extern void selinux_complete_init(void);
extern int selinux_disable(void); extern int selinux_disable(void);
extern void exit_sel_fs(void);
extern struct dentry *selinux_null;
extern struct vfsmount *selinuxfs_mount;
#endif /* _SELINUX_SECURITY_H_ */ #endif /* _SELINUX_SECURITY_H_ */
...@@ -477,7 +477,7 @@ static struct vm_operations_struct sel_mmap_policy_ops = { ...@@ -477,7 +477,7 @@ static struct vm_operations_struct sel_mmap_policy_ops = {
.page_mkwrite = sel_mmap_policy_fault, .page_mkwrite = sel_mmap_policy_fault,
}; };
int sel_mmap_policy(struct file *filp, struct vm_area_struct *vma) static int sel_mmap_policy(struct file *filp, struct vm_area_struct *vma)
{ {
if (vma->vm_flags & VM_SHARED) { if (vma->vm_flags & VM_SHARED) {
/* do not allow mprotect to make mapping writable */ /* do not allow mprotect to make mapping writable */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment