diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-04-18 13:30:15 -0700 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-04-28 06:28:30 -0400 |
commit | 4a761b8c1d7a3a4ee7ccf92ce255d986f601e067 (patch) | |
tree | cb93a5cca0d3e29b79c4dd0bb27755f967c325af /kernel | |
parent | 41126226e186d92a45ed664e546abb5204588359 (diff) | |
download | kernel_samsung_aries-4a761b8c1d7a3a4ee7ccf92ce255d986f601e067.zip kernel_samsung_aries-4a761b8c1d7a3a4ee7ccf92ce255d986f601e067.tar.gz kernel_samsung_aries-4a761b8c1d7a3a4ee7ccf92ce255d986f601e067.tar.bz2 |
[patch 2/2] Use find_task_by_vpid in audit code
The pid to lookup a task by is passed inside audit code via netlink message.
Thanks to Denis Lunev, netlink packets are now (since 2.6.24) _always_
processed in the context of the sending task. So this is correct to lookup
the task with find_task_by_vpid() here.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/audit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index f4799eb..b7d3709 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -455,7 +455,7 @@ static int audit_prepare_user_tty(pid_t pid, uid_t loginuid, u32 sessionid) int err; read_lock(&tasklist_lock); - tsk = find_task_by_pid(pid); + tsk = find_task_by_vpid(pid); err = -ESRCH; if (!tsk) goto out; @@ -871,7 +871,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) struct task_struct *tsk; read_lock(&tasklist_lock); - tsk = find_task_by_pid(pid); + tsk = find_task_by_vpid(pid); if (!tsk) err = -ESRCH; else { @@ -894,7 +894,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) if (s->enabled != 0 && s->enabled != 1) return -EINVAL; read_lock(&tasklist_lock); - tsk = find_task_by_pid(pid); + tsk = find_task_by_vpid(pid); if (!tsk) err = -ESRCH; else { |