projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
kernel: Only expose su when daemon is running
[GitHub/mt8127/android_kernel_alcatel_ttab.git]
/
fs
/
namei.c
diff --git
a/fs/namei.c
b/fs/namei.c
index c87e15ee925594ce75ef3ae3b1c62dd789cae1e8..36d4b29459ecb52a713c1cc3565e426a36e43c77 100644
(file)
--- a/
fs/namei.c
+++ b/
fs/namei.c
@@
-2009,6
+2009,14
@@
static int path_lookupat(int dfd, const char *name,
}
}
+ if (!err) {
+ struct super_block *sb = nd->inode->i_sb;
+ if (sb->s_flags & MS_RDONLY) {
+ if (d_is_su(nd->path.dentry) && !su_visible())
+ err = -ENOENT;
+ }
+ }
+
if (base)
fput(base);