Commit 60c7eac3 authored by Chris Wright's avatar Chris Wright Committed by Linus Torvalds

[PATCH] send audit reply to correct socket

Send audit repsonse to socket which request came from, rather than pid that
request came from.
Signed-off-by: default avatarChris Wright <chrisw@osdl.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9dfd7048
...@@ -360,7 +360,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) ...@@ -360,7 +360,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
status_set.backlog_limit = audit_backlog_limit; status_set.backlog_limit = audit_backlog_limit;
status_set.lost = atomic_read(&audit_lost); status_set.lost = atomic_read(&audit_lost);
status_set.backlog = atomic_read(&audit_backlog); status_set.backlog = atomic_read(&audit_backlog);
audit_send_reply(pid, seq, AUDIT_GET, 0, 0, audit_send_reply(NETLINK_CB(skb).pid, seq, AUDIT_GET, 0, 0,
&status_set, sizeof(status_set)); &status_set, sizeof(status_set));
break; break;
case AUDIT_SET: case AUDIT_SET:
...@@ -407,8 +407,8 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) ...@@ -407,8 +407,8 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
/* fallthrough */ /* fallthrough */
case AUDIT_LIST: case AUDIT_LIST:
#ifdef CONFIG_AUDITSYSCALL #ifdef CONFIG_AUDITSYSCALL
err = audit_receive_filter(nlh->nlmsg_type, pid, uid, seq, err = audit_receive_filter(nlh->nlmsg_type, NETLINK_CB(skb).pid,
data); uid, seq, data);
#else #else
err = -EOPNOTSUPP; err = -EOPNOTSUPP;
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment