aboutsummaryrefslogtreecommitdiff
path: root/kernel/audit.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-05-18 10:21:07 +0100
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-05-18 10:21:07 +0100
commit209aba03243ee42a22f8df8d08aa9963f62aec64 (patch)
treee45ee43e7af31f847377e8bb3a0a61581732b653 /kernel/audit.c
parent3ec3b2fba526ead2fa3f3d7c91924f39a0733749 (diff)
AUDIT: Treat all user messages identically.
It's silly to have to add explicit entries for new userspace messages as we invent them. Just treat all messages in the user range the same. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'kernel/audit.c')
-rw-r--r--kernel/audit.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/kernel/audit.c b/kernel/audit.c
index a0e33b6897d..e6d88635032 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -325,15 +325,7 @@ static int audit_netlink_ok(kernel_cap_t eff_cap, u16 msg_type)
if (!cap_raised(eff_cap, CAP_AUDIT_CONTROL))
err = -EPERM;
break;
- case AUDIT_USER:
- case AUDIT_USER_AUTH:
- case AUDIT_USER_ACCT:
- case AUDIT_USER_MGMT:
- case AUDIT_CRED_ACQ:
- case AUDIT_CRED_DISP:
- case AUDIT_USER_START:
- case AUDIT_USER_END:
- case AUDIT_USER_AVC:
+ case AUDIT_FIRST_USER_MSG...AUDIT_LAST_USER_MSG:
if (!cap_raised(eff_cap, CAP_AUDIT_WRITE))
err = -EPERM;
break;
@@ -402,15 +394,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
audit_set_backlog_limit(status_get->backlog_limit,
loginuid);
break;
- case AUDIT_USER:
- case AUDIT_USER_AUTH:
- case AUDIT_USER_ACCT:
- case AUDIT_USER_MGMT:
- case AUDIT_CRED_ACQ:
- case AUDIT_CRED_DISP:
- case AUDIT_USER_START:
- case AUDIT_USER_END:
- case AUDIT_USER_AVC:
+ case AUDIT_FIRST_USER_MSG...AUDIT_LAST_USER_MSG:
ab = audit_log_start(NULL, msg_type);
if (!ab)
break; /* audit_panic has been called */