Re: PROBLEM?: "permission denied" when accessing /proc/self/fd/*after setuid

From: Alexey Dobriyan
Date: Thu Aug 07 2008 - 20:51:11 EST


On Fri, Aug 08, 2008 at 10:08:21AM +0930, Daryl Tester wrote:
>>> The above environment isn't necessary to replicate the problem, although
>>> what stdout and stderr are attached to has some effect. The attached C
>>> code replicates the issue, but appears to not fail (that is, succeed) if
>>> /proc/self/fd/2 is a terminal (e.g. /dev/pts/X) *and* that terminal is
>>> owned by the same uid that the code uses (in this case, 500). In the
>>> case of an anonymous pipe it appears to fail consistently as the pipe is
>>> owned by root.

Something similar was fixed in 2.6.22, but let me check.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/