An already running process needs a privileged instruction, like using the SO_RCVBUFFORCE socket option. This process is running as a normal user process.
How to give capability/permission to this process? File-based capability settings are still a dream?
I have tried the /usr/sbin/setpcaps
utility from libcap package and the cap_set_proc()
api, but the CAP_SETPCAP
capability is blocked on the system (a legacy system based on Fedora 4 with 2.6.20 kernel), so it can not grant/remove capabilities for a different-then-self process.
Thought about setting temporary root uid to that process, but is there a way to change the effective UID of an external, already running process ?
The setuid()
/seteuid()
/... functions can just modify the current process (who is calling the function).