lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <E1K3obn-0008HS-Sl@pomaz-ex.szeredi.hu>
Date:	Wed, 04 Jun 2008 10:44:39 +0200
From:	Miklos Szeredi <miklos@...redi.hu>
To:	mtk.manpages@...glemail.com
CC:	miklos@...redi.hu, akpm@...ux-foundation.org,
	linux-kernel@...r.kernel.org, hch@....de, viro@...iv.linux.org.uk,
	jamie@...reable.org, drepper@...hat.com,
	linux-fsdevel@...r.kernel.org, subrata@...ux.vnet.ibm.com
Subject: Re: [parch 4/4] vfs: utimensat(): fix write access check for futimens()

> On Wed, Jun 4, 2008 at 7:54 AM, Miklos Szeredi <miklos@...redi.hu> 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-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

Powered by Openwall GNU/*/Linux Powered by OpenVZ