lkml.org 
[lkml]   [2005]   [Dec]   [23]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 23 Dec 2005 11:51:46 +0200
FromAlon Bar-Lev <>
SubjectRe: [Question] LinuxThreads, setuid - Is there user mode hook?
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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-12-23 10:56    [from the cache]
©2003-2009