This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
privileges in a multi-threaded application
- From: <klimes at centrum dot cz>
- To: <libc-help at sourceware dot org>
- Date: Fri, 10 Oct 2008 11:52:10 +0200
- Subject: privileges in a multi-threaded application
- References: <200810101148.5319@centrum.cz> <200810101149.23627@centrum.cz> <200810101150.4345@centrum.cz> <200810101151.4857@centrum.cz>
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