diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-06-29 15:15:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-06-29 15:15:10 -0400 |
commit | a4480ac4f966384f9d2db98bffec223e4eaf6150 (patch) | |
tree | 25760cb0412316ef41cc73fa6c0ac6c4a577025f | |
parent | 4f46accee45d74a408e417c04c0ed1543a7c51e9 (diff) | |
parent | d8de72473effd674a3c1fe9621821f406f5587c9 (diff) |
Merge branch 'audit.b52' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current
* 'audit.b52' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
[PATCH] remove useless argument type in audit_filter_user()
[PATCH] audit: fix kernel-doc parameter notation
[PATCH] kernel/audit.c: nlh->nlmsg_type is gotten more than once
-rw-r--r-- | include/linux/audit.h | 2 | ||||
-rw-r--r-- | kernel/audit.c | 6 | ||||
-rw-r--r-- | kernel/auditfilter.c | 3 |
3 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h index 63c3bb98558f..8b82974bdc12 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -571,7 +571,7 @@ extern void audit_log_lost(const char *message); | |||
571 | extern int audit_update_lsm_rules(void); | 571 | extern int audit_update_lsm_rules(void); |
572 | 572 | ||
573 | /* Private API (for audit.c only) */ | 573 | /* Private API (for audit.c only) */ |
574 | extern int audit_filter_user(struct netlink_skb_parms *cb, int type); | 574 | extern int audit_filter_user(struct netlink_skb_parms *cb); |
575 | extern int audit_filter_type(int type); | 575 | extern int audit_filter_type(int type); |
576 | extern int audit_receive_filter(int type, int pid, int uid, int seq, | 576 | extern int audit_receive_filter(int type, int pid, int uid, int seq, |
577 | void *data, size_t datasz, uid_t loginuid, | 577 | void *data, size_t datasz, uid_t loginuid, |
diff --git a/kernel/audit.c b/kernel/audit.c index e8692a5748c2..e092f1c0ce30 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
@@ -738,7 +738,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
738 | if (!audit_enabled && msg_type != AUDIT_USER_AVC) | 738 | if (!audit_enabled && msg_type != AUDIT_USER_AVC) |
739 | return 0; | 739 | return 0; |
740 | 740 | ||
741 | err = audit_filter_user(&NETLINK_CB(skb), msg_type); | 741 | err = audit_filter_user(&NETLINK_CB(skb)); |
742 | if (err == 1) { | 742 | if (err == 1) { |
743 | err = 0; | 743 | err = 0; |
744 | if (msg_type == AUDIT_USER_TTY) { | 744 | if (msg_type == AUDIT_USER_TTY) { |
@@ -779,7 +779,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
779 | } | 779 | } |
780 | /* fallthrough */ | 780 | /* fallthrough */ |
781 | case AUDIT_LIST: | 781 | case AUDIT_LIST: |
782 | err = audit_receive_filter(nlh->nlmsg_type, NETLINK_CB(skb).pid, | 782 | err = audit_receive_filter(msg_type, NETLINK_CB(skb).pid, |
783 | uid, seq, data, nlmsg_len(nlh), | 783 | uid, seq, data, nlmsg_len(nlh), |
784 | loginuid, sessionid, sid); | 784 | loginuid, sessionid, sid); |
785 | break; | 785 | break; |
@@ -798,7 +798,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
798 | } | 798 | } |
799 | /* fallthrough */ | 799 | /* fallthrough */ |
800 | case AUDIT_LIST_RULES: | 800 | case AUDIT_LIST_RULES: |
801 | err = audit_receive_filter(nlh->nlmsg_type, NETLINK_CB(skb).pid, | 801 | err = audit_receive_filter(msg_type, NETLINK_CB(skb).pid, |
802 | uid, seq, data, nlmsg_len(nlh), | 802 | uid, seq, data, nlmsg_len(nlh), |
803 | loginuid, sessionid, sid); | 803 | loginuid, sessionid, sid); |
804 | break; | 804 | break; |
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index 0e0bd27e6512..98c50cc671bb 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c | |||
@@ -1544,6 +1544,7 @@ static void audit_log_rule_change(uid_t loginuid, u32 sessionid, u32 sid, | |||
1544 | * @data: payload data | 1544 | * @data: payload data |
1545 | * @datasz: size of payload data | 1545 | * @datasz: size of payload data |
1546 | * @loginuid: loginuid of sender | 1546 | * @loginuid: loginuid of sender |
1547 | * @sessionid: sessionid for netlink audit message | ||
1547 | * @sid: SE Linux Security ID of sender | 1548 | * @sid: SE Linux Security ID of sender |
1548 | */ | 1549 | */ |
1549 | int audit_receive_filter(int type, int pid, int uid, int seq, void *data, | 1550 | int audit_receive_filter(int type, int pid, int uid, int seq, void *data, |
@@ -1720,7 +1721,7 @@ static int audit_filter_user_rules(struct netlink_skb_parms *cb, | |||
1720 | return 1; | 1721 | return 1; |
1721 | } | 1722 | } |
1722 | 1723 | ||
1723 | int audit_filter_user(struct netlink_skb_parms *cb, int type) | 1724 | int audit_filter_user(struct netlink_skb_parms *cb) |
1724 | { | 1725 | { |
1725 | enum audit_state state = AUDIT_DISABLED; | 1726 | enum audit_state state = AUDIT_DISABLED; |
1726 | struct audit_entry *e; | 1727 | struct audit_entry *e; |