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] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.0.999.0707161142210.20061@woody.linux-foundation.org>
Date:	Mon, 16 Jul 2007 11:47:26 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Satyam Sharma <ssatyam@....iitk.ac.in>
cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Al Viro <viro@....linux.org.uk>,
	Ulrich Drepper <drepper@...hat.com>
Subject: Re: [PATCH] utime(s): Honour CAP_FOWNER when times==NULL



On Tue, 17 Jul 2007, Satyam Sharma wrote:
>
> [PATCH] utime(s): Honour CAP_FOWNER when times==NULL
> 
> do_utimes() does not honour CAP_FOWNER when times==NULL.
> Trivial and obvious one-line fix.

Ahh, ok. Is this old, or was it introduced recently (I'm looking at my 
recent change to that area, it doesn't seem to introduce this)?

IOW, how did you even notice this?

Also, while your one-liner looks correct, it does make me wonder: the 
whole

	if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER))

test is a rather common test, and in fact, arguably, every time you see 
one part of it, you should probably see the other. Would it make sense to 
make a helper inline function to do this, and replace all users? Doing a

	git grep 'fsuid.*\<i_uid\>'

seems to show quite a few cases of this pattern..

		Linus
-
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