diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-21 10:57:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-21 10:57:45 -0400 |
commit | 7d3628b230ecbdc29566c18bc7800ff8ed66a71f (patch) | |
tree | eac1bff40bdb655fdfdeaf1e22ce12a81296f1fb /kernel | |
parent | 2c7871982cf27caaddbaeb7e2121ce1374b520ff (diff) | |
parent | 94833dfb8c98ed4ca1944dd2c1339d88a2d1c758 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (46 commits)
[NET] ifb: set separate lockdep classes for queue locks
[IPV6] KCONFIG: Fix description about IPV6_TUNNEL.
[TCP]: Fix shrinking windows with window scaling
netpoll: zap_completion_queue: adjust skb->users counter
bridge: use time_before() in br_fdb_cleanup()
[TG3]: Fix build warning on sparc32.
MAINTAINERS: bluez-devel is subscribers-only
audit: netlink socket can be auto-bound to pid other than current->pid (v2)
[NET]: Fix permissions of /proc/net
[SCTP]: Fix a race between module load and protosw access
[NETFILTER]: ipt_recent: sanity check hit count
[NETFILTER]: nf_conntrack_h323: logical-bitwise & confusion in process_setup()
[RT2X00] drivers/net/wireless/rt2x00/rt2x00dev.c: remove dead code, fix warning
[IPV4]: esp_output() misannotations
[8021Q]: vlan_dev misannotations
xfrm: ->eth_proto is __be16
[IPV4]: ipv4_is_lbcast() misannotations
[SUNRPC]: net/* NULL noise
[SCTP]: fix misannotated __sctp_rcv_asconf_lookup()
[PKT_SCHED]: annotate cls_u32
...
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/audit.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index 10c4930c2bbf..be55cb503633 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
@@ -78,9 +78,13 @@ static int audit_default; | |||
78 | /* If auditing cannot proceed, audit_failure selects what happens. */ | 78 | /* If auditing cannot proceed, audit_failure selects what happens. */ |
79 | static int audit_failure = AUDIT_FAIL_PRINTK; | 79 | static int audit_failure = AUDIT_FAIL_PRINTK; |
80 | 80 | ||
81 | /* If audit records are to be written to the netlink socket, audit_pid | 81 | /* |
82 | * contains the (non-zero) pid. */ | 82 | * If audit records are to be written to the netlink socket, audit_pid |
83 | * contains the pid of the auditd process and audit_nlk_pid contains | ||
84 | * the pid to use to send netlink messages to that process. | ||
85 | */ | ||
83 | int audit_pid; | 86 | int audit_pid; |
87 | static int audit_nlk_pid; | ||
84 | 88 | ||
85 | /* If audit_rate_limit is non-zero, limit the rate of sending audit records | 89 | /* If audit_rate_limit is non-zero, limit the rate of sending audit records |
86 | * to that number per second. This prevents DoS attacks, but results in | 90 | * to that number per second. This prevents DoS attacks, but results in |
@@ -350,7 +354,7 @@ static int kauditd_thread(void *dummy) | |||
350 | wake_up(&audit_backlog_wait); | 354 | wake_up(&audit_backlog_wait); |
351 | if (skb) { | 355 | if (skb) { |
352 | if (audit_pid) { | 356 | if (audit_pid) { |
353 | int err = netlink_unicast(audit_sock, skb, audit_pid, 0); | 357 | int err = netlink_unicast(audit_sock, skb, audit_nlk_pid, 0); |
354 | if (err < 0) { | 358 | if (err < 0) { |
355 | BUG_ON(err != -ECONNREFUSED); /* Shoudn't happen */ | 359 | BUG_ON(err != -ECONNREFUSED); /* Shoudn't happen */ |
356 | printk(KERN_ERR "audit: *NO* daemon at audit_pid=%d\n", audit_pid); | 360 | printk(KERN_ERR "audit: *NO* daemon at audit_pid=%d\n", audit_pid); |
@@ -626,6 +630,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
626 | sid, 1); | 630 | sid, 1); |
627 | 631 | ||
628 | audit_pid = new_pid; | 632 | audit_pid = new_pid; |
633 | audit_nlk_pid = NETLINK_CB(skb).pid; | ||
629 | } | 634 | } |
630 | if (status_get->mask & AUDIT_STATUS_RATE_LIMIT) | 635 | if (status_get->mask & AUDIT_STATUS_RATE_LIMIT) |
631 | err = audit_set_rate_limit(status_get->rate_limit, | 636 | err = audit_set_rate_limit(status_get->rate_limit, |