Project

General

Profile

Actions

Bug #2374

closed

Delete SCDropCaps() and all calls to it?

Added by Richard Sailer about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Low
Target version:
-
Affected Versions:
Effort:
Difficulty:
Label:

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?

Actions #1

Updated by Richard Sailer about 7 years ago

  • Status changed from New to Feedback
Actions #2

Updated by Victor Julien about 7 years ago

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.

Actions #3

Updated by Andreas Herz about 7 years ago

  • Target version set to TBD

What's the state of the bug in libpcap-ng?

Actions #4

Updated by Richard Sailer about 7 years ago

  • 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?

Actions #5

Updated by Richard Sailer about 7 years ago

  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF