[Question] LinuxThreads, setuid - Is there user mode hook?

From: Alon Bar-Lev
Date: Thu Dec 22 2005 - 10:48:07 EST


Hello,

I am writing a provider that uses pthreads. The main program does not aware that the provider is using threads and it is not multithreaded.

After initialization the program setuid to nobody, the problem is that my threads remains in root id.

I read about discussions regarding LinuxThreads and figured out that I need to sync the uid,gid by my-self... :(

Is there a way in user mode to know when the process is setuid (some kind of callback)?

The best solution is to set this callback in every thread, so that it will setuid also when the main setuided.

Of course I can spawn a threads that pools the id of the main process... But there must be a better way to do that.

Best Regards,
Alon Bar-Lev.
-
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/