John Johansen | fc7e0b2 | 2017-05-26 01:57:09 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * AppArmor security module |
| 3 | * |
| 4 | * This file contains AppArmor basic permission sets definitions. |
| 5 | * |
| 6 | * Copyright 2017 Canonical Ltd. |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU General Public License as |
| 10 | * published by the Free Software Foundation, version 2 of the |
| 11 | * License. |
| 12 | */ |
| 13 | |
| 14 | #ifndef __AA_PERM_H |
| 15 | #define __AA_PERM_H |
| 16 | |
| 17 | #include <linux/fs.h> |
| 18 | |
| 19 | /* |
| 20 | * We use MAY_EXEC, MAY_WRITE, MAY_READ, MAY_APPEND and the following flags |
| 21 | * for profile permissions |
| 22 | */ |
| 23 | #define AA_MAY_CREATE 0x0010 |
| 24 | #define AA_MAY_DELETE 0x0020 |
| 25 | #define AA_MAY_META_WRITE 0x0040 |
| 26 | #define AA_MAY_META_READ 0x0080 |
| 27 | |
| 28 | #define AA_MAY_CHMOD 0x0100 |
| 29 | #define AA_MAY_CHOWN 0x0200 |
| 30 | #define AA_MAY_LOCK 0x0400 |
| 31 | #define AA_EXEC_MMAP 0x0800 |
| 32 | |
| 33 | #define AA_MAY_LINK 0x1000 |
| 34 | #define AA_LINK_SUBSET AA_MAY_LOCK /* overlaid */ |
| 35 | #define AA_MAY_ONEXEC 0x40000000 /* exec allows onexec */ |
| 36 | #define AA_MAY_CHANGE_PROFILE 0x80000000 |
| 37 | #define AA_MAY_CHANGEHAT 0x80000000 /* ctrl auditing only */ |
| 38 | |
| 39 | |
| 40 | #endif /* __AA_PERM_H */ |