X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda2.sgi.com [192.48.168.29]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m9S30kAV003308 for ; Mon, 27 Oct 2008 20:00:46 -0700 X-ASG-Debug-ID: 1225162845-488d03d10000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from ipmail01.adl6.internode.on.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id C35C854F99D for ; Mon, 27 Oct 2008 20:00:46 -0700 (PDT) Received: from ipmail01.adl6.internode.on.net (ipmail01.adl6.internode.on.net [203.16.214.146]) by cuda.sgi.com with ESMTP id mk6syfa1bySI7BbO for ; Mon, 27 Oct 2008 20:00:46 -0700 (PDT) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Am4DAM8S9kh5LE2tgWdsb2JhbACTYAEBFiKuDIFr X-IronPort-AV: E=Sophos;i="4.33,495,1220193000"; d="scan'208";a="219546251" Received: from ppp121-44-77-173.lns10.syd6.internode.on.net (HELO disturbed) ([121.44.77.173]) by ipmail01.adl6.internode.on.net with ESMTP; 28 Oct 2008 13:30:42 +1030 Received: from dave by disturbed with local (Exim 4.69) (envelope-from ) id 1Kueoz-0004A4-8J; Tue, 28 Oct 2008 14:00:41 +1100 Date: Tue, 28 Oct 2008 14:00:41 +1100 From: Dave Chinner To: Christoph Hellwig Cc: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 3/3] use inode_change_ok for setattr permission checking Subject: Re: [PATCH 3/3] use inode_change_ok for setattr permission checking Message-ID: <20081028030040.GP4985@disturbed> Mail-Followup-To: Christoph Hellwig , xfs@oss.sgi.com References: <20081027133640.GD761@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081027133640.GD761@infradead.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Barracuda-Connect: ipmail01.adl6.internode.on.net[203.16.214.146] X-Barracuda-Start-Time: 1225162846 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0003 1.0000 -2.0194 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.8875 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on oss.sgi.com X-Virus-Status: Clean On Mon, Oct 27, 2008 at 09:36:40AM -0400, Christoph Hellwig wrote: > Instead of implementing our own checks use inode_change_ok to check for > nessecary permission in setattr. There is a slight change in behaviour ^^^^^^^^^ necessary > as inode_change_ok doesn't allow i_mode updates to add the suid or sgid > without superuser privilegues while the old XFS code just stripped away > those bits from the file mode. Better to get an error than silently lose them, I think. > (First sent on Semptember 29th) > > > Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner -- Dave Chinner david@fromorbit.com