Received: by mail.netbsd.org (Postfix, from userid 605) id 0A6FF14A114; Mon, 25 Apr 2011 04:54:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id C035114A112 for ; Mon, 25 Apr 2011 04:54:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at NetBSD.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.NetBSD.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id FNSFOrAGnbHr for ; Mon, 25 Apr 2011 04:54:54 +0000 (UTC) Received: from cvs.netbsd.org (cvs.NetBSD.org [IPv6:2001:4f8:3:7:2e0:81ff:fe30:95bd]) by mail.netbsd.org (Postfix) with ESMTP id D812714A109 for ; Mon, 25 Apr 2011 04:54:53 +0000 (UTC) Received: by cvs.netbsd.org (Postfix, from userid 500) id B2AD1175DD; Mon, 25 Apr 2011 04:54:53 +0000 (UTC) MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Date: Mon, 25 Apr 2011 04:54:53 +0000 From: "Emmanuel Dreyfus" Subject: CVS commit: src/lib/libperfuse To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20110425045453.B2AD1175DD@cvs.netbsd.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Emmanuel Dreyfus" Mail-Followup-To: source-changes-d@NetBSD.org Module Name: src Committed By: manu Date: Mon Apr 25 04:54:53 UTC 2011 Modified Files: src/lib/libperfuse: ops.c perfuse.c perfuse_priv.h subr.c Log Message: - Implement proper unprivilegied user permission verifications Verification is now done in the lookup method, as it is the way to go. Of course there are corner cases, such as the sticky bit which need special handling in the remove method. - Set full fsidx in vftstat method - Do not pass O_APPEND to the filesystem. FUSE always sends the write offset, so setting O_APPEND is useless. If the filesystem uses it in an open(2) system call, it will even cause file corruptions, since offsets given to pwrite(2) will be ignored. This fix allows glusterfs to host a NetBSD ./build.sh -o build - Do not use the FUSE access method, use getattr and check for permission on our own. The problem is that a FUSE filesystem will typically use the Linux-specific setfsuid() to perform access control. If that is missing, any chack is likely to occur on behalf of the user running the filesystem (typically root), causing access method to return wrong information. - When possible, avoid performing a getattr method call and use cached value in puffs_node instead. We still retreive the latest value by calling getattr when performing append write operation, to minimize the chances that another writer appended since the last time we did. - Update puffs_node cached file size in write method - Remove unused argument to perfuse_destroy_pn() To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/lib/libperfuse/ops.c cvs rdiff -u -r1.11 -r1.12 src/lib/libperfuse/perfuse.c cvs rdiff -u -r1.16 -r1.17 src/lib/libperfuse/perfuse_priv.h cvs rdiff -u -r1.10 -r1.11 src/lib/libperfuse/subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.