Commit:     1a823ac9ff09cbdf39201df37b7ede1f9395de83
Parent:     fddd9cf82c9f9617d134ae878a8f6b116ebbd43d
Author:     Miklos Szeredi <[EMAIL PROTECTED]>
AuthorDate: Sat Feb 23 15:23:27 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sat Feb 23 17:12:13 2008 -0800

    fuse: fix permission checking
    I added a nasty local variable shadowing bug to fuse in 2.6.24, with the
    result, that the 'default_permissions' mount option is basically ignored.
    How did this happen?
     - old err declaration in inner scope
     - new err getting declared in outer scope
     - 'return err' from inner scope getting removed
     - old declaration not being noticed
    -Wshadow would have saved us, but it doesn't seem practical for
    the kernel :(
    More testing would have also saved us :((
    Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 fs/fuse/dir.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 7fb514b..c4807b3 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -906,7 +906,7 @@ static int fuse_permission(struct inode *inode, int mask, 
struct nameidata *nd)
        if (fc->flags & FUSE_DEFAULT_PERMISSIONS) {
-               int err = generic_permission(inode, mask, NULL);
+               err = generic_permission(inode, mask, NULL);
                /* If permission is denied, try to refresh file
                   attributes.  This is also needed, because the root
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