aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/audit.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-05-18 05:21:07 -0400
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-05-18 05:21:07 -0400
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 a0e33b6897d7..e6d88635032c 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)
325 if (!cap_raised(eff_cap, CAP_AUDIT_CONTROL)) 325 if (!cap_raised(eff_cap, CAP_AUDIT_CONTROL))
326 err = -EPERM; 326 err = -EPERM;
327 break; 327 break;
328 case AUDIT_USER: 328 case AUDIT_FIRST_USER_MSG...AUDIT_LAST_USER_MSG:
329 case AUDIT_USER_AUTH:
330 case AUDIT_USER_ACCT:
331 case AUDIT_USER_MGMT:
332 case AUDIT_CRED_ACQ:
333 case AUDIT_CRED_DISP:
334 case AUDIT_USER_START:
335 case AUDIT_USER_END:
336 case AUDIT_USER_AVC:
337 if (!cap_raised(eff_cap, CAP_AUDIT_WRITE)) 329 if (!cap_raised(eff_cap, CAP_AUDIT_WRITE))
338 err = -EPERM; 330 err = -EPERM;
339 break; 331 break;
@@ -402,15 +394,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
402 audit_set_backlog_limit(status_get->backlog_limit, 394 audit_set_backlog_limit(status_get->backlog_limit,
403 loginuid); 395 loginuid);
404 break; 396 break;
405 case AUDIT_USER: 397 case AUDIT_FIRST_USER_MSG...AUDIT_LAST_USER_MSG:
406 case AUDIT_USER_AUTH:
407 case AUDIT_USER_ACCT:
408 case AUDIT_USER_MGMT:
409 case AUDIT_CRED_ACQ:
410 case AUDIT_CRED_DISP:
411 case AUDIT_USER_START:
412 case AUDIT_USER_END:
413 case AUDIT_USER_AVC:
414 ab = audit_log_start(NULL, msg_type); 398 ab = audit_log_start(NULL, msg_type);
415 if (!ab) 399 if (!ab)
416 break; /* audit_panic has been called */ 400 break; /* audit_panic has been called */