Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c559d30 authored by Vasiliy Kulikov's avatar Vasiliy Kulikov Committed by Artem Bityutskiy
Browse files

UBIFS: restrict world-writable debugfs files



Don't allow everybody to dump sensitive information about filesystems.

Signed-off-by: default avatarVasiliy Kulikov <segoon@openwall.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
parent be7b42a5
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;