mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-24 20:31:00 +01:00
MINOR: startup: only worker gets capabilities from bin
Due to moving the master-worker fork in init(), we need to protect prepare_caps_from_permitted_set() call, which is executed after init(). This call makes sense only for worker, daemon and for foreground mono process modes. prepare_caps_from_permitted_set() allows to read Linux capabilities from haproxy binary and to move some of them in process Effective set, if 'setcap' keyword lists needed capabilities in the global section.
This commit is contained in:
parent
fe04c2ad37
commit
cb0f1f42e1
@ -3412,6 +3412,7 @@ int main(int argc, char **argv)
|
||||
* is started and run under the same non-root user, this allows
|
||||
* binding to privileged ports.
|
||||
*/
|
||||
if (!(global.mode & MODE_MWORKER))
|
||||
prepare_caps_from_permitted_set(geteuid(), global.uid, argv[0]);
|
||||
#endif
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user