MINOR: sock: set conn->err_code in case of EPERM

To improve the readability of sock_handle_system_err(), let's
set explicitly conn->err_code as CO_ER_SOCK_ERR in case of EPERM
(could be returned by setns syscall).
This commit is contained in:
Valentine Krasnobaeva 2024-05-21 19:24:37 +02:00 committed by Willy Tarreau
parent 5f713c03be
commit 39caa20b3c
1 changed files with 1 additions and 0 deletions

View File

@ -237,6 +237,7 @@ static int sock_handle_system_err(struct connection *conn, struct proxy *be)
break;
case EPERM:
conn->err_code = CO_ER_SOCK_ERR;
send_log(be, LOG_EMERG,
"Proxy %s has insufficient permissions to open server socket.\n",
be->id);