aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2012-01-09 02:38:23 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-01-09 02:38:23 -0500
commitda733563be5a9da26fe81d9f007262d00b846e22 (patch)
treedb28291df94a2043af2123911984c5c173da4e6f /security/selinux/hooks.c
parent6ccbcf2cb41131f8d56ef0723bf3f7c1f8486076 (diff)
parentdab78d7924598ea4031663dd10db814e2e324928 (diff)
Merge branch 'next' into for-linus
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 266a2292451d..1126c10a5e82 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -80,6 +80,7 @@
80#include <linux/posix-timers.h> 80#include <linux/posix-timers.h>
81#include <linux/syslog.h> 81#include <linux/syslog.h>
82#include <linux/user_namespace.h> 82#include <linux/user_namespace.h>
83#include <linux/export.h>
83 84
84#include "avc.h" 85#include "avc.h"
85#include "objsec.h" 86#include "objsec.h"
@@ -89,14 +90,14 @@
89#include "xfrm.h" 90#include "xfrm.h"
90#include "netlabel.h" 91#include "netlabel.h"
91#include "audit.h" 92#include "audit.h"
93#include "avc_ss.h"
92 94
93#define NUM_SEL_MNT_OPTS 5 95#define NUM_SEL_MNT_OPTS 5
94 96
95extern int selinux_nlmsg_lookup(u16 sclass, u16 nlmsg_type, u32 *perm);
96extern struct security_operations *security_ops; 97extern struct security_operations *security_ops;
97 98
98/* SECMARK reference count */ 99/* SECMARK reference count */
99atomic_t selinux_secmark_refcount = ATOMIC_INIT(0); 100static atomic_t selinux_secmark_refcount = ATOMIC_INIT(0);
100 101
101#ifdef CONFIG_SECURITY_SELINUX_DEVELOP 102#ifdef CONFIG_SECURITY_SELINUX_DEVELOP
102int selinux_enforcing; 103int selinux_enforcing;
@@ -279,10 +280,6 @@ static void superblock_free_security(struct super_block *sb)
279 kfree(sbsec); 280 kfree(sbsec);
280} 281}
281 282
282/* The security server must be initialized before
283 any labeling or access decisions can be provided. */
284extern int ss_initialized;
285
286/* The file system's label must be initialized prior to use. */ 283/* The file system's label must be initialized prior to use. */
287 284
288static const char *labeling_behaviors[6] = { 285static const char *labeling_behaviors[6] = {
@@ -2097,9 +2094,6 @@ static int selinux_bprm_secureexec(struct linux_binprm *bprm)
2097 return (atsecure || cap_bprm_secureexec(bprm)); 2094 return (atsecure || cap_bprm_secureexec(bprm));
2098} 2095}
2099 2096
2100extern struct vfsmount *selinuxfs_mount;
2101extern struct dentry *selinux_null;
2102
2103/* Derived from fs/exec.c:flush_old_files. */ 2097/* Derived from fs/exec.c:flush_old_files. */
2104static inline void flush_unauthorized_files(const struct cred *cred, 2098static inline void flush_unauthorized_files(const struct cred *cred,
2105 struct files_struct *files) 2099 struct files_struct *files)
@@ -5803,8 +5797,6 @@ static int selinux_disabled;
5803 5797
5804int selinux_disable(void) 5798int selinux_disable(void)
5805{ 5799{
5806 extern void exit_sel_fs(void);
5807
5808 if (ss_initialized) { 5800 if (ss_initialized) {
5809 /* Not permitted after initial policy load. */ 5801 /* Not permitted after initial policy load. */
5810 return -EINVAL; 5802 return -EINVAL;