aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/audit.h
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2007-06-04 17:00:14 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2007-07-22 09:57:02 -0400
commit74f2345b6be1410f824cb7dd638d2c10a9709379 (patch)
treea9cbdb517eb01b04de3e641d87ef42ad186e91e3 /include/linux/audit.h
parentc926e4f432af0f61ac2b9b637fb51a4871a3fc91 (diff)
[PATCH] allow audit filtering on bit & operations
Right now the audit filter can match on = != > < >= blah blah blah. This allow the filter to also look at bitwise AND operations, & Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/audit.h')
-rw-r--r--include/linux/audit.h30
1 files changed, 17 insertions, 13 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 8ca7ca0b47f0..a35859ab2fdb 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -161,7 +161,7 @@
161 * are currently used in an audit field constant understood by the kernel. 161 * are currently used in an audit field constant understood by the kernel.
162 * If you are adding a new #define AUDIT_<whatever>, please ensure that 162 * If you are adding a new #define AUDIT_<whatever>, please ensure that
163 * AUDIT_UNUSED_BITS is updated if need be. */ 163 * AUDIT_UNUSED_BITS is updated if need be. */
164#define AUDIT_UNUSED_BITS 0x0FFFFC00 164#define AUDIT_UNUSED_BITS 0x07FFFC00
165 165
166 166
167/* Rule fields */ 167/* Rule fields */
@@ -213,25 +213,29 @@
213#define AUDIT_NEGATE 0x80000000 213#define AUDIT_NEGATE 0x80000000
214 214
215/* These are the supported operators. 215/* These are the supported operators.
216 * 4 2 1 216 * 4 2 1 8
217 * = > < 217 * = > < ?
218 * ------- 218 * ----------
219 * 0 0 0 0 nonsense 219 * 0 0 0 0 00 nonsense
220 * 0 0 1 1 < 220 * 0 0 0 1 08 & bit mask
221 * 0 1 0 2 > 221 * 0 0 1 0 10 <
222 * 0 1 1 3 != 222 * 0 1 0 0 20 >
223 * 1 0 0 4 = 223 * 0 1 1 0 30 !=
224 * 1 0 1 5 <= 224 * 1 0 0 0 40 =
225 * 1 1 0 6 >= 225 * 1 0 0 1 48 &= bit test
226 * 1 1 1 7 all operators 226 * 1 0 1 0 50 <=
227 * 1 1 0 0 60 >=
228 * 1 1 1 1 78 all operators
227 */ 229 */
230#define AUDIT_BIT_MASK 0x08000000
228#define AUDIT_LESS_THAN 0x10000000 231#define AUDIT_LESS_THAN 0x10000000
229#define AUDIT_GREATER_THAN 0x20000000 232#define AUDIT_GREATER_THAN 0x20000000
230#define AUDIT_NOT_EQUAL 0x30000000 233#define AUDIT_NOT_EQUAL 0x30000000
231#define AUDIT_EQUAL 0x40000000 234#define AUDIT_EQUAL 0x40000000
235#define AUDIT_BIT_TEST (AUDIT_BIT_MASK|AUDIT_EQUAL)
232#define AUDIT_LESS_THAN_OR_EQUAL (AUDIT_LESS_THAN|AUDIT_EQUAL) 236#define AUDIT_LESS_THAN_OR_EQUAL (AUDIT_LESS_THAN|AUDIT_EQUAL)
233#define AUDIT_GREATER_THAN_OR_EQUAL (AUDIT_GREATER_THAN|AUDIT_EQUAL) 237#define AUDIT_GREATER_THAN_OR_EQUAL (AUDIT_GREATER_THAN|AUDIT_EQUAL)
234#define AUDIT_OPERATORS (AUDIT_EQUAL|AUDIT_NOT_EQUAL) 238#define AUDIT_OPERATORS (AUDIT_EQUAL|AUDIT_NOT_EQUAL|AUDIT_BIT_MASK)
235 239
236/* Status symbols */ 240/* Status symbols */
237 /* Mask values */ 241 /* Mask values */