Commit d355987f authored by Eric Paris's avatar Eric Paris

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: default avatarEric Paris <eparis@redhat.com>
parent 40d3d0b8
...@@ -94,8 +94,6 @@ ...@@ -94,8 +94,6 @@
#include "audit.h" #include "audit.h"
#include "avc_ss.h" #include "avc_ss.h"
#define NUM_SEL_MNT_OPTS 5
extern struct security_operations *security_ops; extern struct security_operations *security_ops;
/* SECMARK reference count */ /* SECMARK reference count */
...@@ -307,8 +305,11 @@ enum { ...@@ -307,8 +305,11 @@ enum {
Opt_defcontext = 3, Opt_defcontext = 3,
Opt_rootcontext = 4, Opt_rootcontext = 4,
Opt_labelsupport = 5, Opt_labelsupport = 5,
Opt_nextmntopt = 6,
}; };
#define NUM_SEL_MNT_OPTS (Opt_nextmntopt - 1)
static const match_table_t tokens = { static const match_table_t tokens = {
{Opt_context, CONTEXT_STR "%s"}, {Opt_context, CONTEXT_STR "%s"},
{Opt_fscontext, FSCONTEXT_STR "%s"}, {Opt_fscontext, FSCONTEXT_STR "%s"},
......
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