Re: [parch 4/4] vfs: utimensat(): fix write access check for futimens()

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

 



> On Wed, Jun 4, 2008 at 7:54 AM, Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
> >> At which point the "if (f)" and the "else" branches become equivalent
> >> (the nameidata isn't interesting in the other case either).  So that
> >> could be written as:
> >>
> >>               if (!is_owner_or_cap(inode)) {
> >>                       error = permission(inode, MAY_WRITE, NULL);
> >>                       if (error)
> >>                               goto mnt_drop_write_and_out;
> >>               }
> >
> > And also the IS_IMMUTABLE() check can be removed, since it's checked
> > by permission(MAY_WRITE) anyway.
> 
> I'm not sure that that is true, because immutability applies
> regardless of capabilities or ownership, right?

Yeah, you're right.  I misread that.

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