aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/debug.c
diff options
context:
space:
mode:
authorVasiliy Kulikov <segoon@openwall.com>2011-02-04 07:24:19 -0500
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-02-06 11:59:31 -0500
commit8c559d30b4e59cf6994215ada1fe744928f494bf (patch)
treed1a539f486d4f6a6150bee42a1e6e22bc98c4545 /fs/ubifs/debug.c
parentbe7b42a5cb4c5050bcab4f57022007155c119d45 (diff)
UBIFS: restrict world-writable debugfs files
Don't allow everybody to dump sensitive information about filesystems. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/debug.c')
-rw-r--r--fs/ubifs/debug.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c
index 0bee4dbffc31..bcb1acb79263 100644
--- a/fs/ubifs/debug.c
+++ b/fs/ubifs/debug.c
@@ -2813,19 +2813,19 @@ int dbg_debugfs_init_fs(struct ubifs_info *c)
2813 } 2813 }
2814 2814
2815 fname = "dump_lprops"; 2815 fname = "dump_lprops";
2816 dent = debugfs_create_file(fname, S_IWUGO, d->dfs_dir, c, &dfs_fops); 2816 dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops);
2817 if (IS_ERR(dent)) 2817 if (IS_ERR(dent))
2818 goto out_remove; 2818 goto out_remove;
2819 d->dfs_dump_lprops = dent; 2819 d->dfs_dump_lprops = dent;
2820 2820
2821 fname = "dump_budg"; 2821 fname = "dump_budg";
2822 dent = debugfs_create_file(fname, S_IWUGO, d->dfs_dir, c, &dfs_fops); 2822 dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops);
2823 if (IS_ERR(dent)) 2823 if (IS_ERR(dent))
2824 goto out_remove; 2824 goto out_remove;
2825 d->dfs_dump_budg = dent; 2825 d->dfs_dump_budg = dent;
2826 2826
2827 fname = "dump_tnc"; 2827 fname = "dump_tnc";
2828 dent = debugfs_create_file(fname, S_IWUGO, d->dfs_dir, c, &dfs_fops); 2828 dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops);
2829 if (IS_ERR(dent)) 2829 if (IS_ERR(dent))
2830 goto out_remove; 2830 goto out_remove;
2831 d->dfs_dump_tnc = dent; 2831 d->dfs_dump_tnc = dent;