Re: [RFC] LSM generic ioctl permissions patch (1/1)

From: Chris Wright (chrisw@private)
Date: Thu Nov 10 2005 - 08:17:42 PST


* Stephen Smalley (sds@private) wrote:
> On Thu, 2005-11-10 at 00:04 -0800, Chris Wright wrote:
> > Interesting approach.  Here are a few issues I see:
> > 
> > 1) Ioctls are already a mess, it's not clear this helps that situation.
> > For example, IOC_DIR is already enough to figure read/write, and adding
> > a new table which could get the wrong dir when it's supposedly already
> > encoded just seems to add to the mess.
> 
> Hmmm...so you'd suggest just having the existing selinux_file_ioctl()
> hook function switch off of _IOC_DIR(cmd) and apply checking based on
> that information?  That would be a very simple patch.

To a first approximation.  I'm not 100% sure that each ioctl cmd has
that encoding so it would need some testing.  And I'd expect you'd still
want to special case some ioctls within SELinux.

thanks,
-chris



This archive was generated by hypermail 2.1.3 : Thu Nov 10 2005 - 08:18:29 PST