summaryrefslogtreecommitdiff
path: root/security/selinux
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2011-08-30 10:50:12 +1000
committerJames Morris <jmorris@namei.org>2011-09-09 16:56:30 -0700
commitad3fa08c4ff84ed87649d72e8497735c85561a3d (patch)
treee6f22e6d42cf52c689e983be42b9292180564446 /security/selinux
parentd5813a571876c72766f125b1c6e63414f6822c28 (diff)
downloadlinux-3.10-ad3fa08c4ff84ed87649d72e8497735c85561a3d.tar.gz
linux-3.10-ad3fa08c4ff84ed87649d72e8497735c85561a3d.tar.bz2
linux-3.10-ad3fa08c4ff84ed87649d72e8497735c85561a3d.zip
selinux: sparse fix: eliminate warnings for selinuxfs
Fixes several sparse warnings for selinuxfs.c Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/selinux')
-rw-r--r--security/selinux/hooks.c5
-rw-r--r--security/selinux/include/security.h3
-rw-r--r--security/selinux/selinuxfs.c2
3 files changed, 4 insertions, 6 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index e07cf7fcdce..4a176b46871 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -2097,9 +2097,6 @@ static int selinux_bprm_secureexec(struct linux_binprm *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. */
static inline void flush_unauthorized_files(const struct cred *cred,
struct files_struct *files)
@@ -5803,8 +5800,6 @@ static int selinux_disabled;
int selinux_disable(void)
{
- extern void exit_sel_fs(void);
-
if (ss_initialized) {
/* Not permitted after initial policy load. */
return -EINVAL;
diff --git a/security/selinux/include/security.h b/security/selinux/include/security.h
index 30002c43436..13b626352f0 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);
extern void selinux_status_update_policyload(int seqno);
extern void selinux_complete_init(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_ */
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index d3677c6c12c..ba2ada5f16a 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -477,7 +477,7 @@ static struct vm_operations_struct sel_mmap_policy_ops = {
.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) {
/* do not allow mprotect to make mapping writable */