From: OGAWA Hirofumi Subject: Re: [Patch 1/2] selinux: ajust rules for ATTR_FORCE Date: Tue, 18 Aug 2009 05:11:23 +0900 Message-ID: <87fxbq19qs.fsf@devron.myhome.or.jp> References: <20090817071001.5913.94767.sendpatchset@localhost.localdomain> <20090817071011.5913.69970.sendpatchset@localhost.localdomain> <1250511313.3629.103.camel@moss-pluto.epoch.ncsc.mil> <87prau5ld1.fsf@devron.myhome.or.jp> <1250536052.3629.154.camel@moss-pluto.epoch.ncsc.mil> <873a7q441a.fsf@devron.myhome.or.jp> <1250538981.3629.184.camel@moss-pluto.epoch.ncsc.mil> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Amerigo Wang , linux-kernel@vger.kernel.org, esandeen@redhat.com, eteo@redhat.com, eparis@redhat.com, linux-fsdevel@vger.kernel.org, akpm@linux-foundation.org, viro@zeniv.linux.org.uk To: Stephen Smalley Return-path: Received: from mail.parknet.ad.jp ([210.171.162.6]:57351 "EHLO mail.officemail.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752944AbZHQULZ (ORCPT ); Mon, 17 Aug 2009 16:11:25 -0400 In-Reply-To: <1250538981.3629.184.camel@moss-pluto.epoch.ncsc.mil> (Stephen Smalley's message of "Mon, 17 Aug 2009 15:56:21 -0400") Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Stephen Smalley writes: >> E.g. mode change has implicit ATTR_CTIME change. So it meant, we should >> check the both of FILE__SETATTR and FILE__WRITE? > > No, just setattr. Ok. >> > ATTR_FORCE is supposed to suppress permission checking altogether, and >> > shouldn't be mixed with multiple attribute changes if some should be >> > subject to permission checks while others should not. >> >> I disagree. In fact, ATTR_FORCE is just used for ATTR_KILL_S[UG]ID, and >> notify_change() is disallowing the mixed ATTR_MODE and ATTR_KILL_*. I >> think it should be enough. > > Ok, then we just need to adjust selinux_inode_setattr to understand that > ATTR_FORCE only means to bypass checking on ATTR_MODE. Ok, sure. I'll try it. Thanks. -- OGAWA Hirofumi