This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Add pthread_detach_pwd call.

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
internal structure.

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]