Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88451
b: refs/heads/master
c: 832cbd9
h: refs/heads/master
i:
  88449: 7218362
  88447: f355d6b
v: v3
  • Loading branch information
Eric Paris authored and James Morris committed Apr 18, 2008
1 parent 4c3edd6 commit 177f5b0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0e55a004b58847c53e48d846b9a4570b1587c382
refs/heads/master: 832cbd9aa1293cba57d06571f5fc8f0917c672af
16 changes: 8 additions & 8 deletions trunk/security/selinux/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,10 @@ enum {
};

static match_table_t tokens = {
{Opt_context, "context=%s"},
{Opt_fscontext, "fscontext=%s"},
{Opt_defcontext, "defcontext=%s"},
{Opt_rootcontext, "rootcontext=%s"},
{Opt_context, CONTEXT_STR "%s"},
{Opt_fscontext, FSCONTEXT_STR "%s"},
{Opt_defcontext, DEFCONTEXT_STR "%s"},
{Opt_rootcontext, ROOTCONTEXT_STR "%s"},
{Opt_error, NULL},
};

Expand Down Expand Up @@ -2287,10 +2287,10 @@ static inline int match_prefix(char *prefix, int plen, char *option, int olen)

static inline int selinux_option(char *option, int len)
{
return (match_prefix("context=", sizeof("context=")-1, option, len) ||
match_prefix("fscontext=", sizeof("fscontext=")-1, option, len) ||
match_prefix("defcontext=", sizeof("defcontext=")-1, option, len) ||
match_prefix("rootcontext=", sizeof("rootcontext=")-1, option, len));
return (match_prefix(CONTEXT_STR, sizeof(CONTEXT_STR)-1, option, len) ||
match_prefix(FSCONTEXT_STR, sizeof(FSCONTEXT_STR)-1, option, len) ||
match_prefix(DEFCONTEXT_STR, sizeof(DEFCONTEXT_STR)-1, option, len) ||
match_prefix(ROOTCONTEXT_STR, sizeof(ROOTCONTEXT_STR)-1, option, len));
}

static inline void take_option(char **to, char *from, int *first, int len)
Expand Down
5 changes: 5 additions & 0 deletions trunk/security/selinux/include/security.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
#define ROOTCONTEXT_MNT 0x04
#define DEFCONTEXT_MNT 0x08

#define CONTEXT_STR "context="
#define FSCONTEXT_STR "fscontext="
#define ROOTCONTEXT_STR "rootcontext="
#define DEFCONTEXT_STR "defcontext="

struct netlbl_lsm_secattr;

extern int selinux_enabled;
Expand Down

0 comments on commit 177f5b0

Please sign in to comment.