[RFC] Add pthread_detach_pwd call.

Ondřej Bílka neleai@seznam.cz
Mon Oct 21 12:13:00 GMT 2013


On Mon, Oct 21, 2013 at 12:09:33PM +0200, Florian Weimer wrote:
> On 10/21/2013 12:25 AM, Rich Felker wrote:
> 
> >There is already a clean, portable way to achieve the exact same
> >thing: the *at functions.
> 
> fsetxattrat is missing, though.  Probably more.
> 
> I also don't see how we can actually implement something like
> pthread_detach_pwd without adding and awful lot of wrappers.  It's
> certainly not just open and fopen, but anything that expects a path
> name.
>
I expected that there is only limited number of primitives that access
internal structure.
 
> (By the way, I think UID and GID are more problematic in this area.)
> 

They are but per-thread behavior would probably require cooperation with
kernel.

Or ugly hacks like global lock on open and calling seteuid if they
disagree.

> -- 
> Florian Weimer / Red Hat Product Security Team



More information about the Libc-alpha mailing list