Bug #2374
closed
Delete SCDropCaps() and all calls to it?
Added by Richard Sailer almost 7 years ago.
Updated almost 7 years ago.
Description
POSIX requires that all pthread of a process have the same uid and gid (man ntpl, man setuid). Linux implements this.
If you change the uid of one thread, the pids of all others are synchronised. In util-privs.c we have two functions:
- SCDropMainThreadCaps()
Drops privileges for mainthread at startup and therefore for all threads.
- SCDropCaps()
SCDropCaps() currently does nothing (body disabled via #if 0 preprocessor macro), but gets called at several points in the code.
I would suggest to remove the function definition and its calls.
Any opinions, thoughts on this?
- Status changed from New to Feedback
It might actually be interesting to look at activating it. It was disabled from the start because of a bug in libcap-ng. Setting the per-thread caps instead of just the per process caps could still make sense I think.
- Target version set to TBD
What's the state of the bug in libpcap-ng?
- Target version deleted (
TBD)
Victor Julien wrote:
It might actually be interesting to look at activating it. It was disabled from the start because of a bug in libcap-ng. Setting the per-thread caps instead of just the per process caps could still make sense I think.
Okay, so I will close this issue and open a new one about designing and implementing sensible per-thread capabilities (#2375). I will make it low priority and assign it to myself, but only as a "perhaps-future" tasks, because currently the whole log reopen issue is my task. Does this make sense?
- Status changed from Feedback to Closed
Also available in: Atom
PDF