~ubuntu-branches/ubuntu/wily/apparmor/wily

« back to all changes in this revision

Viewing changes to parser/libapparmor_re/apparmor_re.h

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2011-04-27 10:38:07 UTC
  • mfrom: (5.1.118 natty)
  • Revision ID: james.westby@ubuntu.com-20110427103807-ym3rhwys6o84ith0
Tags: 2.6.1-2
debian/copyright: clarify for some full organization names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*   $Id: apparmor.h 6203 2006-02-02 22:03:41Z steve $
2
 
 
3
 
     Copyright (c) 2003, 2004, 2005, 2006 Novell, Inc. (All rights reserved)
4
 
 
5
 
     The libapparmor library is licensed under the terms of the GNU
6
 
     Lesser General Public License, version 2.1. Please see the file
7
 
     COPYING.LGPL.
8
 
*/
 
1
/*
 
2
 *   Copyright (c) 2003, 2004, 2005, 2006, 2007 Novell, Inc.
 
3
 *   (All rights reserved)
 
4
 *
 
5
 *   The libapparmor library is licensed under the terms of the GNU
 
6
 *   Lesser General Public License, version 2.1. Please see the file
 
7
 *   COPYING.LGPL.
 
8
 */
9
9
 
10
10
#ifndef APPARMOR_RE_H
11
11
#define APPARMOR_RE_H
12
12
 
 
13
typedef enum dfaflags {
 
14
  DFA_CONTROL_EQUIV =           1 << 0,
 
15
  DFA_CONTROL_TREE_NORMAL =     1 << 1,
 
16
  DFA_CONTROL_TREE_SIMPLE =     1 << 2,
 
17
  DFA_CONTROL_TREE_LEFT =       1 << 3,
 
18
  DFA_CONTROL_MINIMIZE =        1 << 4,
 
19
  DFA_CONTROL_MINIMIZE_HASH_TRANS = 1 << 5,
 
20
  DFA_CONTROL_MINIMIZE_HASH_PERMS = 1 << 6,
 
21
  DFA_CONTROL_REMOVE_UNREACHABLE =      1 << 7,
 
22
  DFA_CONTROL_TRANS_HIGH =      1 << 8,
 
23
 
 
24
  DFA_DUMP_UNIQ_PERMS =         1 << 14,
 
25
  DFA_DUMP_MIN_UNIQ_PERMS =     1 << 15,
 
26
  DFA_DUMP_TREE_STATS =         1 << 16,
 
27
  DFA_DUMP_TREE =               1 << 17,
 
28
  DFA_DUMP_SIMPLE_TREE =        1 << 18,
 
29
  DFA_DUMP_PROGRESS =           1 << 19,
 
30
  DFA_DUMP_STATS =              1 << 20,
 
31
  DFA_DUMP_STATES =             1 << 21,
 
32
  DFA_DUMP_GRAPH =              1 << 22,
 
33
  DFA_DUMP_TRANS_PROGRESS =     1 << 23,
 
34
  DFA_DUMP_TRANS_STATS =        1 << 24,
 
35
  DFA_DUMP_TRANS_TABLE =        1 << 25,
 
36
  DFA_DUMP_EQUIV =              1 << 26,
 
37
  DFA_DUMP_EQUIV_STATS =        1 << 27,
 
38
  DFA_DUMP_MINIMIZE =           1 << 28,
 
39
  DFA_DUMP_UNREACHABLE =        1 << 29,
 
40
  DFA_DUMP_RULE_EXPR =          1 << 30,
 
41
  DFA_DUMP_NODE_TO_DFA =        1 << 31,
 
42
} dfaflags_t;
 
43
 
13
44
#ifdef __cplusplus
14
45
extern "C" {
15
46
#endif
20
51
 
21
52
aare_ruleset_t *aare_new_ruleset(int reverse);
22
53
void aare_delete_ruleset(aare_ruleset_t *rules);
23
 
int aare_add_rule(aare_ruleset_t *rules, char *rule, uint32_t perms);
24
 
void *aare_create_dfa(aare_ruleset_t *rules, int equiv_classes, size_t *size);
 
54
int aare_add_rule(aare_ruleset_t *rules, char *rule, int deny,
 
55
                  uint32_t perms, uint32_t audit, dfaflags_t flags);
 
56
int aare_add_rule_vec(aare_ruleset_t *rules, int deny, uint32_t perms,
 
57
                      uint32_t audit, int count, char **rulev, dfaflags_t flags);
 
58
void *aare_create_dfa(aare_ruleset_t *rules, size_t *size, dfaflags_t flags);
 
59
void aare_reset_matchflags(void);
25
60
 
26
61
#ifdef __cplusplus
27
62
}