From 36c2ab9d5ce2be50afa8e7cfee1e648fec8525fb Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Tue, 8 May 2007 00:30:40 -0700 Subject: [PATCH] --- yaml --- r: 54702 b: refs/heads/master c: ee6f958291e2a768fd727e7a67badfff0b67711a h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/namespace.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index e155dfec3640..0043f707ce8d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2f1a2ccb9c0de632ab07193becf5f7121794f6ae +refs/heads/master: ee6f958291e2a768fd727e7a67badfff0b67711a diff --git a/trunk/fs/namespace.c b/trunk/fs/namespace.c index 72bb1062bfe7..b696e3a0d18f 100644 --- a/trunk/fs/namespace.c +++ b/trunk/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;