aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-05-06 08:26:27 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2006-06-20 05:25:22 -0400
commit3c66251e573219a0532a5a07381b2f60a412d9eb (patch)
treeb047b25d28ae1abe6bb81daba886e44e0a82094f
parentf46038ff7d23ae092d61b366332c05aab8227b48 (diff)
[PATCH] add filtering by ppid
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--include/linux/audit.h1
-rw-r--r--kernel/auditsc.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 1057e90bd3e..8f6424f2b60 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -152,6 +152,7 @@
#define AUDIT_SE_TYPE 15 /* security label type */
#define AUDIT_SE_SEN 16 /* security label sensitivity label */
#define AUDIT_SE_CLR 17 /* security label clearance label */
+#define AUDIT_PPID 18
/* These are ONLY useful when checking
* at syscall exit time (AUDIT_AT_EXIT). */
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 4fc3867fa25..e4551659ad7 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -188,6 +188,10 @@ static int audit_filter_rules(struct task_struct *tsk,
case AUDIT_PID:
result = audit_comparator(tsk->pid, f->op, f->val);
break;
+ case AUDIT_PPID:
+ if (ctx)
+ result = audit_comparator(ctx->ppid, f->op, f->val);
+ break;
case AUDIT_UID:
result = audit_comparator(tsk->uid, f->op, f->val);
break;