X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fnamespace.c;h=b696e3a0d18fcf2d4bb017dcaa36dacb39c565e6;hb=6f7cc11aa6c7d5002e16096c7590944daece70ed;hp=72bb1062bfe77886394a79c0822ec141aad55045;hpb=b5e618181a927210f8be1d3d2249d31904ba358d;p=linux-2.6 diff --git a/fs/namespace.c b/fs/namespace.c index 72bb1062bf..b696e3a0d1 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;