Commit:     ee6f958291e2a768fd727e7a67badfff0b67711a
Parent:     2f1a2ccb9c0de632ab07193becf5f7121794f6ae
Author:     Miklos Szeredi <[EMAIL PROTECTED]>
AuthorDate: Tue May 8 00:30:40 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue May 8 11:15:12 2007 -0700

    check privileges before setting mount propagation
    There's a missing check for CAP_SYS_ADMIN in do_change_type().
    Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]>
    Cc: Al Viro <[EMAIL PROTECTED]>
    Cc: Christoph Hellwig <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 fs/namespace.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fs/namespace.c b/fs/namespace.c
index 72bb106..b696e3a 100644
--- 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;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to