Re: [PATCH 0/7] overlay filesystem v9

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(Neil, sorry for the dup)

NeilBrown <neilb@xxxxxxx> writes:

> On Thu, 19 May 2011 19:05:58 +0100 Andy Whitcroft <apw@xxxxxxxxxxxxx> wrote:
>
>> On Thu, May 19, 2011 at 07:44:54PM +0200, Miklos Szeredi wrote:
>> > I'd be happier if the LSM module were fixed not to peek inside the inode
>> > structure.  Some filesystems (notably network ones) do not guarantee i_*
>> > to be up-to-date, relying on these is not a good idea.
>> 
>> I wonder what what the official way to get ownership information for an
>> inode is if we cannot rely on those.  I am happy to get the Yama LSM
>> fixed up if they are doing something wrong.
>> 
>> -apw
>
> inode->getattr(...., &kstat);
> look at kstat.uid, kstat.gid.

Yeah, it should probably do something like:

	if (inode->i_op->getattr) {
		struct kstat stat;
		inode->i_op->getattr(...)
		uid = stat.uid;
	} else {
		uid = inode->i_uid;
	}

The problem is that getattr takes a vfsmount, which makes this
impossible to do cleanly.  And the solution is for ->getattr() to lose
that argument, which is a bit more involved :(

Thanks,
Miklos
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux