login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
March
»
19
Re: [PATCH] Audit: netlink socket can be auto-bound to pid other than current->pid
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Eric Paris
Subject:
Re: [PATCH] Audit: netlink socket can be auto-bound to pid other than current->pid
Date: Wednesday, March 19, 2008 - 5:04 am
On 3/19/08, Pavel Emelyanov <xemul@openvz.org> wrote:
quoted text
> Eric Paris wrote: > > On 3/18/08, Pavel Emelyanov <xemul@openvz.org> wrote: > > > > Can we please just leave audit_pid as the one flag to tell us if > > auditd is supposedly up there in userspace? Use audit_nlk_pid to send > > messages to the right place, but leave everything else to do with > > audit_pid alone. > > > OK, point taken ;) Is that patch looks OK? If yes, I'll comment > it properly and re-send to Andrew. > > The audit_nlk_pid reset to 0 is not required, since all the > decisions are taken based on audit_pid value only.
I looks good to me. Feel free to add Acked-by: Eric Paris <eparis@redhat.com> on your submission. -Eric
quoted text
> > Signed-off-by: Pavel Emelyanov <xemul@openvz.org> > > > diff --git a/kernel/audit.c b/kernel/audit.c > > index ccc7d0e..12a0278 100644 > > --- a/kernel/audit.c > +++ b/kernel/audit.c > > @@ -77,9 +77,13 @@ static int audit_default; > > /* If auditing cannot proceed, audit_failure selects what happens. */ > static int audit_failure = AUDIT_FAIL_PRINTK; > > -/* If audit records are to be written to the netlink socket, audit_pid > > - * contains the (non-zero) pid. */ > +/* > + * If audit records are to be written to the netlink socket, audit_pid > + * contains the pid of the auditd process and audit_nlk_pid contains > + * the pid to use to send netlink messages to that process. > + */ > int audit_pid; > > +static int audit_nlk_pid; > > > /* If audit_rate_limit is non-zero, limit the rate of sending audit records > > * to that number per second. This prevents DoS attacks, but results in > @@ -349,7 +353,7 @@ static int kauditd_thread(void *dummy) > > wake_up(&audit_backlog_wait); > if (skb) { > if (audit_pid) { > - int err = netlink_unicast(audit_sock, skb, audit_pid, 0); > > + int err = netlink_unicast(audit_sock, skb, audit_nlk_pid, 0); > > if (err < 0) { > BUG_ON(err != -ECONNREFUSED); /* Shoudn't happen */ > 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) > > sid, 1); > > audit_pid = new_pid; > + audit_nlk_pid = NETLINK_CB(skb).pid; > } > if (status_get->mask & AUDIT_STATUS_RATE_LIMIT) > err = audit_set_rate_limit(status_get->rate_limit, >
--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[PATCH] Audit: netlink socket can be auto-bound to pid oth ...
, Pavel Emelyanov
, (Tue Mar 18, 2:24 am)
Re: [PATCH] Audit: netlink socket can be auto-bound to pid ...
, Eric Paris
, (Tue Mar 18, 4:29 pm)
Re: [PATCH] Audit: netlink socket can be auto-bound to pid ...
, Eric Paris
, (Tue Mar 18, 4:35 pm)
Re: [PATCH] Audit: netlink socket can be auto-bound to pid ...
, Pavel Emelyanov
, (Wed Mar 19, 2:11 am)
Re: [PATCH] Audit: netlink socket can be auto-bound to pid ...
, Eric Paris
, (Wed Mar 19, 5:04 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
FUJITA Tomonori
Re: [Scst-devel] Integration of SCST in the mainstream Linux kernel
Benjamin Herrenschmidt
[git pull] Please pull powerpc.git merge branch
Ingo Molnar
Re: [RFC/RFT PATCH] sched: automated per tty task groups
Vivek Goyal
Re: [PATCH v4] sched: automated per session task groups
Andres Salomon
Re: [PATCH 1/2] OLPC: Add support for calling into Open Firmware
git
:
Mike Miller
git message
Junio C Hamano
Re: [PATCH] Detached HEAD (experimental)
Stefan Richter
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
Jeff King
Re: [PATCH] t7004: test that "git-tag -u" implies "-s"
A Large Angry SCM
Re: [RFC] origin link for cherry-pick and revert
git-commits-head
:
Linux Kernel Mailing List
libata: disable ATAPI AN by default
Linux Kernel Mailing List
ARM: 5905/1: ARM: Global ASID allocation on SMP
Linux Kernel Mailing List
i915: Don't whine when pci_enable_msi() fails.
Linux Kernel Mailing List
Documentation/timers/hpet_example.c: only build on X86
Linux Kernel Mailing List
ALSA: hda - Enable beep on Realtek codecs with PCI SSID override
linux-netdev
:
Arnaldo Carvalho de Melo
Re: [PATCH 06/37] dccp: Limit feature negotiation to connection setup phase
Gerrit Renker
[PATCH 1/5] dccp: Initialisation framework for feature negotiation
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
Jeff Garzik
Re: [PATCH] drivers/net: remove network drivers' last few uses of IRQF_SAMPLE_RANDOM
David Miller
Re: [PATCH 2/5] dccp: Auto-load (when supported) CCID plugins for negotiation
openbsd-misc
:
Stuart Henderson
Re: Kuro5hin: OpenBSD Founder Theo deRaadt Has Conflict of Interest With AMD
Christian Weisgerber
Re: CARP with a single public IP address
Marco Peereboom
Re: OpenBSD culture?
"RALOVICH, Kristóf"
Re: thinkpad windows refund
Kevin
Re: uvm_mapent_alloc: out of static map entries on 4.3 i386
Colocation donated by:
Syndicate