-
-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setxid should change credentials for all threads #718
Comments
sysdeps or kernel, frankly, though we should probably provide some cross-thread communication utilities for this and other cases that need it |
Handling this seems really extremely horrible. I don't think many programs use these functions in multithreaded environments, so maybe we could get away with some assertion that no threads are spawned and wait for a proper kernel fix. |
there most likely won't be a proper kernel fix, afaik I agree that we should do this in the Linux sysdeps until the necessity of a real fix is observed, and it should likely be:
(edit for elaboration: assert thread count == 0, for the time being, if it becomes necessary, implement the above, or try to bargain with the Linux devs) |
It's not necessary (or useful) to iterate over /proc/self/tasks since we can simply keep a global list of threads. But the remainder of the procedure sounds right. |
the usefulness is that it covers the edge case of the program itself cloning without using pthread_create (I think the signal handler should be inherited well enough for this) |
If a program does |
See e.g https://ewontfix.com/17/.
Should this be done in the sysdep or in the libc?
The text was updated successfully, but these errors were encountered: