]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: sock: add EPERM case in sock_handle_system_err
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Tue, 23 Apr 2024 21:42:47 +0000 (23:42 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 30 Apr 2024 19:39:32 +0000 (21:39 +0200)
commit13ef5524888faf47936ce54a0164dac2689ff7b5
tree40f7606b32bee5c5028d5fde53e039d61a00e1bf
parentd3fc982cd788e8b244c974eefa8658d38e51c9ed
MINOR: sock: add EPERM case in sock_handle_system_err

setns() may return EPERM if thread, that tries to move into different
namespace, do not have CAP_SYS_ADMIN capability in its Effective set.
So, extending sock_handle_system_err() with this error allows to send
appropriate log message and set SF_ERR_PRXCOND (SC termination
flag in log) as stream termination error code. This error code can be
simply checked with SF_ERR_MASK at protocol layer.
src/sock.c