This is the mail archive of the
mailing list for the glibc project.
Re: [RFC] Add pthread_detach_pwd call.
- From: Florian Weimer <fweimer at redhat dot com>
- To: OndÅej BÃlka <neleai at seznam dot cz>
- Cc: Rich Felker <dalias at aerifal dot cx>, libc-alpha at sourceware dot org
- Date: Mon, 21 Oct 2013 14:32:38 +0200
- Subject: Re: [RFC] Add pthread_detach_pwd call.
- Authentication-results: sourceware.org; auth=none
- References: <20131020174109 dot GA17943 at domone dot podge> <20131020222505 dot GK20515 at brightrain dot aerifal dot cx> <5264FD5D dot 6040605 at redhat dot com> <20131021121336 dot GA23647 at domone dot podge>
On 10/21/2013 02:13 PM, OndÅej BÃlka wrote:
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
I expected that there is only limited number of primitives that access
Which 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
The kernel already keeps the IDs in a per-thread fashion. We probably
could add something like uselocale() so that threads could opt out of
the global treatment.
Back in the LinuxThreads days, we actually had per-thread IDs, but since
mutexes (or condition variables) sometimes involved signals, this didn't
work all that well because you could get permission-related failures
from pthread_* functions. Futexes probably make this a lot simpler.
Florian Weimer / Red Hat Product Security Team