From: Alon Bar-Lev <alon.barlev@gmail.com>
To: David Wagner <daw@cs.berkeley.edu>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [Question] LinuxThreads, setuid - Is there user mode hook?
Date: Fri, 23 Dec 2005 11:51:46 +0200 [thread overview]
Message-ID: <43ABC8B2.7020904@gmail.com> (raw)
In-Reply-To: <200512222312.jBMNCj96018554@taverner.CS.Berkeley.EDU>
David Wagner wrote:
> In article <43AACA82.5050305@gmail.com> you write:
>
>>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.
>
>
> Mixing threads and setuid programs seems like a really bad idea.
> This is especially true if you have to ask about it -- which means
> that you don't know enough to write such a program safely (please
> don't take offense).
>
I know that!
And I am aware of the (Linux implementation) implications...
I don't think you read my question in deep...
I offer a provider (Shared library), and I must deal with
this edge condition where the main program setuid.
In Linux every thread is a process so only the main thread
is setuided.
I need to catch this even in my shared library and setuid my
threads as well, since Linux pthreads implementation does
not take care of this.
Since I am not writing the main program and since I cannot
force the main programmer to behave any differently, I must
handle this internally.
Do you know a way to be notified when the process setuid?
Best Regards,
Alon Bar-Lev.
next parent reply other threads:[~2005-12-23 9:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200512222312.jBMNCj96018554@taverner.CS.Berkeley.EDU>
2005-12-23 9:51 ` Alon Bar-Lev [this message]
2005-12-23 19:08 ` [Question] LinuxThreads, setuid - Is there user mode hook? Lee Revell
2005-12-23 20:21 ` Daniel Jacobowitz
2005-12-23 20:36 ` Lee Revell
2005-12-23 20:33 ` Daniel Jacobowitz
2005-12-24 16:16 ` Alon Bar-Lev
2005-12-25 1:31 ` Luke-Jr
2005-12-25 8:05 ` Alon Bar-Lev
[not found] <5mRSA-6ss-15@gated-at.bofh.it>
[not found] ` <5n1S5-9P-21@gated-at.bofh.it>
[not found] ` <5n1S5-9P-19@gated-at.bofh.it>
[not found] ` <5nt1F-5aZ-1@gated-at.bofh.it>
2005-12-27 2:33 ` Robert Hancock
[not found] <200512231927.jBNJR2uG019083@taverner.CS.Berkeley.EDU>
2005-12-24 16:18 ` Alon Bar-Lev
2005-12-22 15:47 Alon Bar-Lev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43ABC8B2.7020904@gmail.com \
--to=alon.barlev@gmail.com \
--cc=daw@cs.berkeley.edu \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox