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

« back to all changes in this revision

Viewing changes to module/apparmor/shared.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
 
/*
2
 
 *      Copyright (C) 2000, 2001, 2004, 2005 Novell/SUSE
3
 
 *
4
 
 *      Immunix AppArmor LSM
5
 
 *
6
 
 *      This program is free software; you can redistribute it and/or
7
 
 *      modify it under the terms of the GNU General Public License as
8
 
 *      published by the Free Software Foundation, version 2 of the
9
 
 *      License.
10
 
 */
11
 
 
12
 
#ifndef _SHARED_H
13
 
#define _SHARED_H
14
 
 
15
 
/* start of system offsets */
16
 
#define POS_AA_FILE_MIN                 0
17
 
#define POS_AA_MAY_EXEC                 POS_AA_FILE_MIN
18
 
#define POS_AA_MAY_WRITE                (POS_AA_MAY_EXEC + 1)
19
 
#define POS_AA_MAY_READ                 (POS_AA_MAY_WRITE + 1)
20
 
#define POS_AA_MAY_APPEND               (POS_AA_MAY_READ + 1)
21
 
/* end of system offsets */
22
 
 
23
 
#define POS_AA_MAY_LINK                 (POS_AA_MAY_APPEND + 1)
24
 
#define POS_AA_EXEC_INHERIT             (POS_AA_MAY_LINK + 1)
25
 
#define POS_AA_EXEC_UNCONSTRAINED       (POS_AA_EXEC_INHERIT + 1)
26
 
#define POS_AA_EXEC_PROFILE             (POS_AA_EXEC_UNCONSTRAINED + 1)
27
 
#define POS_AA_EXEC_MMAP                (POS_AA_EXEC_PROFILE + 1)
28
 
#define POS_AA_EXEC_UNSAFE              (POS_AA_EXEC_MMAP + 1)
29
 
#define POS_AA_FILE_MAX                 POS_AA_EXEC_UNSAFE
30
 
 
31
 
/* Modeled after MAY_READ, MAY_WRITE, MAY_EXEC def'ns */
32
 
#define AA_MAY_EXEC                     (0x01 << POS_AA_MAY_EXEC)
33
 
#define AA_MAY_WRITE                    (0x01 << POS_AA_MAY_WRITE)
34
 
#define AA_MAY_READ                     (0x01 << POS_AA_MAY_READ)
35
 
#define AA_MAY_LINK                     (0x01 << POS_AA_MAY_LINK)
36
 
#define AA_EXEC_INHERIT                 (0x01 << POS_AA_EXEC_INHERIT)
37
 
#define AA_EXEC_UNCONSTRAINED           (0x01 << POS_AA_EXEC_UNCONSTRAINED)
38
 
#define AA_EXEC_PROFILE                 (0x01 << POS_AA_EXEC_PROFILE)
39
 
#define AA_EXEC_MMAP                    (0x01 << POS_AA_EXEC_MMAP)
40
 
#define AA_EXEC_UNSAFE                  (0x01 << POS_AA_EXEC_UNSAFE)
41
 
 
42
 
#define AA_EXEC_MODIFIERS               (AA_EXEC_INHERIT | \
43
 
                                         AA_EXEC_UNCONSTRAINED | \
44
 
                                         AA_EXEC_PROFILE)
45
 
 
46
 
#endif /* _SHARED_H */