privileges in a multi-threaded application

klimes@centrum.cz klimes@centrum.cz
Fri Oct 10 09:52:00 GMT 2008


Hello glibc users/hackers,

I'd like to ask a question on changing privileges in a multi-threaded
application.  A quite long time ago (in 2005) I tried to change privileges
using setresuid(). However my application was terminated due to real-time signal
SIG33 (aka SIGSETXID). I solved the problem by calling setresuid() *before*
creating threads.

Presently I again need to manipulate with privileges, but I have to do it later
(after threads are created). So the previous solution is not possible.
Nevertheless I tried a simple test and don't encounter any real-time signal
as a response on setresuid(), hmmm.
Has something changed in glibc/pthread?
How is it possible to handle privilege changes in a multi-thteadded app?
(What I want to achieve is to send netlink xfrm messages via PF_NETLINK socket,
which requires privilege.)

Jiri Klimes



More information about the Libc-help mailing list