From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753381Ab1HKTus (ORCPT ); Thu, 11 Aug 2011 15:50:48 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:60641 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752214Ab1HKTur (ORCPT ); Thu, 11 Aug 2011 15:50:47 -0400 Date: Thu, 11 Aug 2011 23:50:34 +0400 From: Vasiliy Kulikov To: linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo Cc: Ingo Molnar , Ben Hutchings , Christian Ohm , David Ahern , Frederic Weisbecker , Jonathan Nieder , Mike Galbraith , Paul Mackerras , Peter Zijlstra , Stephane Eranian Subject: re: perf tools: Check $HOME/.perfconfig ownership Message-ID: <20110811195033.GA17313@albatros> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, The commit 069e3725dd9be3b759a98e8c80ac5fc38b392b23 introduced a check whether $HOME/.perfconfig file is owned by the user. Three comments here: 1) How other user may create a file in other user's home directory? If we assume he may do it, the situation is bad without any perf :( 2) If we assume (1) is somehow possible (e.g. other user may manipulate this file only), there is a race against file creation/deletion and stat. 3) .perfconfig can be a symlink, so stat(2) should be changed to lstat(2). Thanks, -- Vasiliy