summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/sysfs.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2016-08-31 16:49:29 -0500
committerDavid Sterba <dsterba@suse.com>2016-09-26 17:59:49 +0200
commit07f6a480436595394a06a69d0ebc18fef6736197 (patch)
treef313ecd11c0756473231089700df3f5a01c55c54 /fs/btrfs/sysfs.c
parentc79a175175d5a908a7c4d923d44f36808f56536e (diff)
downloadop-kernel-dev-07f6a480436595394a06a69d0ebc18fef6736197.zip
op-kernel-dev-07f6a480436595394a06a69d0ebc18fef6736197.tar.gz
btrfs: fix perms on demonstration debugfs interface
btrfs provides a helpful demonstration of how to export a global variable via debugfs; however, it is unique among other debugfs files in that it is world-writable, which causes some concern to people who are not familiar with its purpose. Fix it so that it is only user-writable. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/sysfs.c')
-rw-r--r--fs/btrfs/sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
index c656990..804bd1c 100644
--- a/fs/btrfs/sysfs.c
+++ b/fs/btrfs/sysfs.c
@@ -836,7 +836,7 @@ static int btrfs_init_debugfs(void)
if (!btrfs_debugfs_root_dentry)
return -ENOMEM;
- debugfs_create_u64("test", S_IRUGO | S_IWUGO, btrfs_debugfs_root_dentry,
+ debugfs_create_u64("test", S_IRUGO | S_IWUSR, btrfs_debugfs_root_dentry,
&btrfs_debugfs_test);
#endif
return 0;
OpenPOWER on IntegriCloud