From 0a7077f5364454de39fb1ac486d4bd233aa11798 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Sun, 11 Nov 2001 18:20:17 +0000 Subject: x --- kernel/dir.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'kernel/dir.c') diff --git a/kernel/dir.c b/kernel/dir.c index 9a3d4ee..cd6394a 100644 --- a/kernel/dir.c +++ b/kernel/dir.c @@ -117,7 +117,8 @@ static struct dentry *fuse_lookup(struct inode *dir, struct dentry *entry) return ERR_PTR(ret); } -/* create needs to return a positive entry, so this also does a lookup */ +/* create needs to return a positive entry, so this is actually an + mknod+lookup */ static int fuse_mknod(struct inode *dir, struct dentry *entry, int mode, int rdev) { @@ -305,14 +306,11 @@ static int fuse_permission(struct inode *inode, int mask) { struct fuse_conn *fc = INO_FC(inode); - /* (too) simple protection for non-privileged mounts */ - if(fc->uid) { - if(current->fsuid == fc->uid) - return 0; - else - return -EACCES; - } - return 0; + /* (too) simple protection */ + if(current->fsuid == fc->uid) + return 0; + else + return -EACCES; } static int fuse_revalidate(struct dentry *entry) -- cgit v1.2.3