diff options
author | Hong zhi guo <honkiko@gmail.com> | 2013-03-27 02:49:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-28 14:25:49 -0400 |
commit | 941912133025926307c7a65b203fa38403b1063a (patch) | |
tree | b0db217873ae6bfbeca986f9ff9c2490423fbfe5 | |
parent | 573ce260b385a4d14a1ef046558fad9f1daeee42 (diff) |
audit: replace obsolete NLMSG_* with type safe nlmsg_*
Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | kernel/audit.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index d596e5355f15..4dbb0470006e 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
@@ -58,7 +58,7 @@ | |||
58 | #ifdef CONFIG_SECURITY | 58 | #ifdef CONFIG_SECURITY |
59 | #include <linux/security.h> | 59 | #include <linux/security.h> |
60 | #endif | 60 | #endif |
61 | #include <linux/netlink.h> | 61 | #include <net/netlink.h> |
62 | #include <linux/freezer.h> | 62 | #include <linux/freezer.h> |
63 | #include <linux/tty.h> | 63 | #include <linux/tty.h> |
64 | #include <linux/pid_namespace.h> | 64 | #include <linux/pid_namespace.h> |
@@ -910,7 +910,7 @@ static void audit_receive_skb(struct sk_buff *skb) | |||
910 | { | 910 | { |
911 | struct nlmsghdr *nlh; | 911 | struct nlmsghdr *nlh; |
912 | /* | 912 | /* |
913 | * len MUST be signed for NLMSG_NEXT to be able to dec it below 0 | 913 | * len MUST be signed for nlmsg_next to be able to dec it below 0 |
914 | * if the nlmsg_len was not aligned | 914 | * if the nlmsg_len was not aligned |
915 | */ | 915 | */ |
916 | int len; | 916 | int len; |
@@ -919,13 +919,13 @@ static void audit_receive_skb(struct sk_buff *skb) | |||
919 | nlh = nlmsg_hdr(skb); | 919 | nlh = nlmsg_hdr(skb); |
920 | len = skb->len; | 920 | len = skb->len; |
921 | 921 | ||
922 | while (NLMSG_OK(nlh, len)) { | 922 | while (nlmsg_ok(nlh, len)) { |
923 | err = audit_receive_msg(skb, nlh); | 923 | err = audit_receive_msg(skb, nlh); |
924 | /* if err or if this message says it wants a response */ | 924 | /* if err or if this message says it wants a response */ |
925 | if (err || (nlh->nlmsg_flags & NLM_F_ACK)) | 925 | if (err || (nlh->nlmsg_flags & NLM_F_ACK)) |
926 | netlink_ack(skb, nlh, err); | 926 | netlink_ack(skb, nlh, err); |
927 | 927 | ||
928 | nlh = NLMSG_NEXT(nlh, len); | 928 | nlh = nlmsg_next(nlh, len); |
929 | } | 929 | } |
930 | } | 930 | } |
931 | 931 | ||
@@ -1483,7 +1483,7 @@ void audit_log_end(struct audit_buffer *ab) | |||
1483 | audit_log_lost("rate limit exceeded"); | 1483 | audit_log_lost("rate limit exceeded"); |
1484 | } else { | 1484 | } else { |
1485 | struct nlmsghdr *nlh = nlmsg_hdr(ab->skb); | 1485 | struct nlmsghdr *nlh = nlmsg_hdr(ab->skb); |
1486 | nlh->nlmsg_len = ab->skb->len - NLMSG_SPACE(0); | 1486 | nlh->nlmsg_len = ab->skb->len - NLMSG_HDRLEN; |
1487 | 1487 | ||
1488 | if (audit_pid) { | 1488 | if (audit_pid) { |
1489 | skb_queue_tail(&audit_skb_queue, ab->skb); | 1489 | skb_queue_tail(&audit_skb_queue, ab->skb); |