projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f1a2cc
)
check privileges before setting mount propagation
author
Miklos Szeredi
<mszeredi@suse.cz>
Tue, 8 May 2007 07:30:40 +0000
(
00:30
-0700)
committer
Linus Torvalds
<torvalds@woody.linux-foundation.org>
Tue, 8 May 2007 18:15:12 +0000
(11:15 -0700)
There's a missing check for CAP_SYS_ADMIN in do_change_type().
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/namespace.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/namespace.c
b/fs/namespace.c
index 72bb1062bfe77886394a79c0822ec141aad55045..b696e3a0d18fcf2d4bb017dcaa36dacb39c565e6 100644
(file)
--- a/
fs/namespace.c
+++ b/
fs/namespace.c
@@
-886,6
+886,9
@@
static int do_change_type(struct nameidata *nd, int flag)
int recurse = flag & MS_REC;
int type = flag & ~MS_REC;
+ if (!capable(CAP_SYS_ADMIN))
+ return -EPERM;
+
if (nd->dentry != nd->mnt->mnt_root)
return -EINVAL;