summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorChristian Brauner <christian@brauner.io>2019-01-21 13:48:03 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-22 14:25:53 +0300
commite98e6fa18636609f14a7f866524950a783cf4fbf (patch)
treebf5bd8f3cd65048a8f44455b52d7697bc4b29016 /README
parent7c4d08fc4d5aca073bd4ebecbb9eda5e4d858b71 (diff)
downloadlinux-e98e6fa18636609f14a7f866524950a783cf4fbf.tar.xz
binderfs: prevent renaming the control dentry
- make binderfs control dentry immutable: We don't allow to unlink it since it is crucial for binderfs to be useable but if we allow to rename it we make the unlink trivial to bypass. So prevent renaming too and simply treat the control dentry as immutable. - add is_binderfs_control_device() helper: Take the opportunity and turn the check for the control dentry into a separate helper is_binderfs_control_device() since it's now used in two places. - simplify binderfs_rename(): Instead of hand-rolling our custom version of simple_rename() just dumb the whole function down to first check whether we're trying to rename the control dentry. If we do EPERM the caller and if not call simple_rename(). Suggested-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Christian Brauner <christian@brauner.io> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions