[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200710262224.45773.agruen@suse.de>
Date: Fri, 26 Oct 2007 22:24:45 +0200
From: Andreas Gruenbacher <agruen@...e.de>
To: Miklos Szeredi <mszeredi@...e.cz>
Cc: jjohansen@...e.de, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org, linux-security-module@...r.kernel.org
Subject: Re: [AppArmor 32/45] Enable LSM hooks to distinguish operations on file descriptors from operations on pathnames
On Friday 26 October 2007 13:30, Miklos Szeredi wrote:
> There's a slight problem (other than HCH not liking it) with this
> approach of passing the open file in iattr: for special files, the
> struct file pointer makes no sense to the filesystem, since it is always
> opened by the generic functions.
So what do you think where the inodes come from for syscalls like fchmod? Out
of struct file, of course. But your f_op->getattr and f_op->setattr patches
are meant for passing struct file down to filesystems anyway, so that
completely contradicts what you are saying above.
> So I think the correct solution (which was suggested by Trond and
> others) is to define an f_op->fsetattr() method, which interested
> filesystems can define.
That's nothing but a replacement for ATTR_FILE and iattr->ia_file. Except by
removing the ATTR_FILE flag, LSMs will no longer get that information for
distinguishing file descriptor operations from other operations.
AppArmor needs to know when notify_change is called on a file descriptor, but
it doesn't care about the file descriptor itself. So any way of passing along
that information will be fine.
Thanks,
Andreas
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists