mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 21:51:05 +00:00
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>
This commit is contained in:
parent
3ec3b2fba5
commit
209aba0324
3 changed files with 11 additions and 43 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue