From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752555Ab1BDMY0 (ORCPT ); Fri, 4 Feb 2011 07:24:26 -0500 Received: from mail-fx0-f46.google.com ([209.85.161.46]:32973 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752361Ab1BDMYX (ORCPT ); Fri, 4 Feb 2011 07:24:23 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=Vj/fl+YN5rtBUgeSy72/XuKPdnW1vjcll1JSpl55roTUYFcV9wEgPVf/Bc8UbnSIlL gNzoC5ldT/2PLpDfEnYvE6TmzR1VwYUDaJC3+noYCcrnSNc4p/kgnlPspJYldnw2ybIr GpguzJXlTH/vey8IohnbifOiBuD5H4NKchDUc= From: Vasiliy Kulikov To: linux-kernel@vger.kernel.org Cc: security@kernel.org, Artem Bityutskiy , Adrian Hunter , linux-mtd@lists.infradead.org Subject: [PATCH 20/20] fs: ubifs: world-writable debugfs dump_* files Date: Fri, 4 Feb 2011 15:24:19 +0300 Message-Id: X-Mailer: git-send-email 1.7.0.4 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Don't allow everybody to dump sensitive information about filesystems. Signed-off-by: Vasiliy Kulikov --- Compile tested only. fs/ubifs/debug.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index 0bee4db..bcb1acb 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c @@ -2813,19 +2813,19 @@ int dbg_debugfs_init_fs(struct ubifs_info *c) } fname = "dump_lprops"; - dent = debugfs_create_file(fname, S_IWUGO, d->dfs_dir, c, &dfs_fops); + dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops); if (IS_ERR(dent)) goto out_remove; d->dfs_dump_lprops = dent; fname = "dump_budg"; - dent = debugfs_create_file(fname, S_IWUGO, d->dfs_dir, c, &dfs_fops); + dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops); if (IS_ERR(dent)) goto out_remove; d->dfs_dump_budg = dent; fname = "dump_tnc"; - dent = debugfs_create_file(fname, S_IWUGO, d->dfs_dir, c, &dfs_fops); + dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops); if (IS_ERR(dent)) goto out_remove; d->dfs_dump_tnc = dent; -- 1.7.0.4 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-fx0-f49.google.com ([209.85.161.49]) by canuck.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1PlKi7-00016y-PO for linux-mtd@lists.infradead.org; Fri, 04 Feb 2011 12:24:24 +0000 Received: by fxm19 with SMTP id 19so2379311fxm.36 for ; Fri, 04 Feb 2011 04:24:22 -0800 (PST) Sender: Vasiliy Kulikov From: Vasiliy Kulikov To: linux-kernel@vger.kernel.org Subject: [PATCH 20/20] fs: ubifs: world-writable debugfs dump_* files Date: Fri, 4 Feb 2011 15:24:19 +0300 Message-Id: In-Reply-To: References: Cc: security@kernel.org, Adrian Hunter , linux-mtd@lists.infradead.org, Artem Bityutskiy List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Don't allow everybody to dump sensitive information about filesystems. Signed-off-by: Vasiliy Kulikov --- Compile tested only. fs/ubifs/debug.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index 0bee4db..bcb1acb 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c @@ -2813,19 +2813,19 @@ int dbg_debugfs_init_fs(struct ubifs_info *c) } fname = "dump_lprops"; - dent = debugfs_create_file(fname, S_IWUGO, d->dfs_dir, c, &dfs_fops); + dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops); if (IS_ERR(dent)) goto out_remove; d->dfs_dump_lprops = dent; fname = "dump_budg"; - dent = debugfs_create_file(fname, S_IWUGO, d->dfs_dir, c, &dfs_fops); + dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops); if (IS_ERR(dent)) goto out_remove; d->dfs_dump_budg = dent; fname = "dump_tnc"; - dent = debugfs_create_file(fname, S_IWUGO, d->dfs_dir, c, &dfs_fops); + dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops); if (IS_ERR(dent)) goto out_remove; d->dfs_dump_tnc = dent; -- 1.7.0.4