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

« back to all changes in this revision

Viewing changes to parser/libapparmor_re/aare_rules.h

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2011-08-10 18:12:34 UTC
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: james.westby@ubuntu.com-20110810181234-b6obckg60cp99crg
Tags: upstream-2.7.0~beta1+bzr1774
ImportĀ upstreamĀ versionĀ 2.7.0~beta1+bzr1774

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * (C) 2006, 2007 Andreas Gruenbacher <agruen@suse.de>
 
3
 * Copyright (c) 2003-2008 Novell, Inc. (All rights reserved)
 
4
 * Copyright 2009-2010 Canonical Ltd.
 
5
 *
 
6
 * The libapparmor library is licensed under the terms of the GNU
 
7
 * Lesser General Public License, version 2.1. Please see the file
 
8
 * COPYING.LGPL.
 
9
 *
 
10
 * This library is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 * GNU Lesser General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU Lesser General Public License
 
16
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
17
 *
 
18
 *
 
19
 * Wrapper around the dfa to convert aa rules into a dfa
 
20
 */
 
21
#ifndef __LIBAA_RE_RULES_H
 
22
#define __LIBAA_RE_RULES_H
 
23
 
 
24
#include <stdint.h>
 
25
 
 
26
#include "apparmor_re.h"
 
27
 
 
28
#ifdef __cplusplus
 
29
extern "C" {
 
30
#endif
 
31
 
 
32
struct aare_ruleset;
 
33
 
 
34
typedef struct aare_ruleset aare_ruleset_t;
 
35
 
 
36
aare_ruleset_t *aare_new_ruleset(int reverse);
 
37
void aare_delete_ruleset(aare_ruleset_t *rules);
 
38
int aare_add_rule(aare_ruleset_t *rules, char *rule, int deny, uint32_t perms,
 
39
                  uint32_t audit, dfaflags_t flags);
 
40
int aare_add_rule_vec(aare_ruleset_t *rules, int deny, uint32_t perms,
 
41
                      uint32_t audit, int count, char **rulev,
 
42
                      dfaflags_t flags);
 
43
void *aare_create_dfa(aare_ruleset_t *rules, size_t *size, dfaflags_t flags);
 
44
void aare_reset_matchflags(void);
 
45
 
 
46
#ifdef __cplusplus
 
47
}
 
48
#endif
 
49
#endif                          /* __LIBAA_RE_RULES_H */