From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: [PATCH 1/4] 9p: do no return 0 from ->check_acl without actually checking Date: Sat, 23 Jul 2011 17:36:38 +0200 Message-ID: <20110723153638.GA10887@lst.de> References: <20110723153621.GA10832@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel To: Al Viro , Linus Torvalds Return-path: Received: from verein.lst.de ([213.95.11.211]:33419 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752516Ab1GWPgj (ORCPT ); Sat, 23 Jul 2011 11:36:39 -0400 Content-Disposition: inline In-Reply-To: <20110723153621.GA10832@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: If we do not want to use ACLs we at least need to perform normal Unix permission checks. From the comment I'm not quite sure that's what is intended, but if 0p wants to do permission checks entirely on the server it needs to do so in ->permission, not in ->check_acl. Signed-off-by: Christoph Hellwig Index: linux-2.6/fs/9p/acl.c =================================================================== --- linux-2.6.orig/fs/9p/acl.c 2011-07-23 16:39:19.200749795 +0200 +++ linux-2.6/fs/9p/acl.c 2011-07-23 16:39:24.690749763 +0200 @@ -108,7 +108,7 @@ int v9fs_check_acl(struct inode *inode, * On access = client and acl = on mode get the acl * values from the server */ - return 0; + return -EAGAIN; } acl = v9fs_get_cached_acl(inode, ACL_TYPE_ACCESS);