lkml.org 
[lkml]   [2009]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Patch 1/2] selinux: ajust rules for ATTR_FORCE
From
Date
On Tue, 2009-08-18 at 04:46 +0900, OGAWA Hirofumi wrote:
> Stephen Smalley <sds@tycho.nsa.gov> writes:
>
> >> [I'm still not sure what selinux want to do. normally inode_permission()
> >> should check truncate() permission, and this FILE__SIZE checks something
> >> again...? And we want to check FILE__WRITE for ATTR_[AMC]TIME?]
> >
> > Explicit setting of mode, owner, group, or timestamps is to be checked
> > by the setattr permission, while implicit setting of timestamps or size
> > is mediated by the write permission.
>
> 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.

> > 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.

> If ATTR_FORCE is confusable, I think we can just add new ATTR_FORCE_MODE
> or ATTR_FORCE_KILL, and replace with current ATTR_FORCE. I'm ok either
> way. But, with this change, ATTR_FORCE has no users.

--
Stephen Smalley
National Security Agency



\
 
 \ /
  Last update: 2009-08-17 21:55    [W:0.052 / U:1.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site