]> git.itanic.dy.fi Git - linux-stable/commitdiff
UBIFS: restrict world-writable debugfs files
authorVasiliy Kulikov <segoon@openwall.com>
Fri, 4 Feb 2011 12:24:19 +0000 (15:24 +0300)
committerAndi Kleen <ak@linux.intel.com>
Thu, 28 Apr 2011 15:21:03 +0000 (08:21 -0700)
commit 8c559d30b4e59cf6994215ada1fe744928f494bf upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
fs/ubifs/debug.c

index 923d697a302a227fabc16db6ca97e3cdddd141d0..a0c09fc49962a095aa7b78a0ba9882e7cac6b53c 100644 (file)
@@ -2687,19 +2687,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;