Message ID | 1420626588-25450-1-git-send-email-luis.henriques@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/fs/namespace.c b/fs/namespace.c index e718c7a0437a..67645ea593f2 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -1448,6 +1448,9 @@ SYSCALL_DEFINE2(umount, char __user *, name, int, flags) goto dput_and_out; if (mnt->mnt.mnt_flags & MNT_LOCKED) goto dput_and_out; + retval = -EPERM; + if (flags & MNT_FORCE && !capable(CAP_SYS_ADMIN)) + goto dput_and_out; retval = do_umount(mnt, flags); dput_and_out: