From: Pekka Enberg <penberg@kernel.org>
To: Vasiliy Kulikov <segoon@openwall.com>
Cc: linux-kernel@vger.kernel.org,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [PATCH] perf: fix temporary file ownership check
Date: Fri, 12 Aug 2011 08:17:43 +0300 [thread overview]
Message-ID: <1313126263.29737.21.camel@jaguar> (raw)
In-Reply-To: <20110811205537.GA22864@albatros>
On Fri, 2011-08-12 at 00:55 +0400, Vasiliy Kulikov wrote:
> A file in /tmp/ might be a symlink, so lstat() should be used
> instead of stat().
>
> Cc: Pekka Enberg <penberg@kernel.org>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Pekka Enberg <penberg@kernel.org>
> ---
> tools/perf/util/symbol.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
> index a8b5371..5db39f6 100644
> --- a/tools/perf/util/symbol.c
> +++ b/tools/perf/util/symbol.c
> @@ -1506,7 +1506,7 @@ int dso__load(struct dso *dso, struct map *map, symbol_filter_t filter)
> if (strncmp(dso->name, "/tmp/perf-", 10) == 0) {
> struct stat st;
>
> - if (stat(dso->name, &st) < 0)
> + if (lstat(dso->name, &st) < 0)
> return -1;
>
> if (st.st_uid && (st.st_uid != geteuid())) {
next prev parent reply other threads:[~2011-08-12 5:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-11 20:55 [PATCH] perf: fix temporary file ownership check Vasiliy Kulikov
2011-08-12 5:17 ` Pekka Enberg [this message]
2011-08-14 15:38 ` [tip:perf/core] " tip-bot for Vasiliy Kulikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1313126263.29737.21.camel@jaguar \
--to=penberg@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=segoon@openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.