From: Miklos Szeredi <miklos@szeredi.hu>

This patch replaces check for zero fsuid with a capability check.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/fs/fuse/dir.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN fs/fuse/dir.c~fuse-dont-check-against-zero-fsuid fs/fuse/dir.c
--- 25/fs/fuse/dir.c~fuse-dont-check-against-zero-fsuid	Fri Jan 14 15:10:48 2005
+++ 25-akpm/fs/fuse/dir.c	Fri Jan 14 15:10:48 2005
@@ -422,7 +422,7 @@ static int fuse_revalidate(struct dentry
 		if (!(fc->flags & FUSE_ALLOW_OTHER) &&
 		    current->fsuid != fc->user_id &&
 		    (!(fc->flags & FUSE_ALLOW_ROOT) ||
-		     current->fsuid != 0))
+		     !capable(CAP_DAC_OVERRIDE)))
 			return -EACCES;
 	} else if (time_before_eq(jiffies, fi->i_time))
 		return 0;
@@ -435,7 +435,7 @@ static int fuse_permission(struct inode 
 	struct fuse_conn *fc = get_fuse_conn(inode);
 
 	if (!(fc->flags & FUSE_ALLOW_OTHER) && current->fsuid != fc->user_id &&
-	    (!(fc->flags & FUSE_ALLOW_ROOT) || current->fsuid != 0))
+	    (!(fc->flags & FUSE_ALLOW_ROOT) || !capable(CAP_DAC_OVERRIDE)))
 		return -EACCES;
 	else if (fc->flags & FUSE_DEFAULT_PERMISSIONS) {
 		int err = generic_permission(inode, mask, NULL);
_