summaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2012-08-24 21:58:53 +0200
committerEric Paris <eparis@redhat.com>2013-07-25 19:02:53 +0200
commitd355987f47bbe24e7450b509a3f8aac0db88b65a (patch)
tree60bd8865c311f6319f9ab3f26be57b95b55e5685 /security/selinux/hooks.c
parentSELinux: remove crazy contortions around proc (diff)
downloadlinux-d355987f47bbe24e7450b509a3f8aac0db88b65a.tar.xz
linux-d355987f47bbe24e7450b509a3f8aac0db88b65a.zip
SELinux: make it harder to get the number of mnt opts wrong
Instead of just hard coding a value, use the enum to out benefit. Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 42b538ceb8b4..863f20590186 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -94,8 +94,6 @@
#include "audit.h"
#include "avc_ss.h"
-#define NUM_SEL_MNT_OPTS 5
-
extern struct security_operations *security_ops;
/* SECMARK reference count */
@@ -307,8 +305,11 @@ enum {
Opt_defcontext = 3,
Opt_rootcontext = 4,
Opt_labelsupport = 5,
+ Opt_nextmntopt = 6,
};
+#define NUM_SEL_MNT_OPTS (Opt_nextmntopt - 1)
+
static const match_table_t tokens = {
{Opt_context, CONTEXT_STR "%s"},
{Opt_fscontext, FSCONTEXT_STR "%s"},