[cmaster-next] [PATCH] ldpd: add missing privilege dropping on error path
19 Dec
2016
19 Dec
'16
4:09 p.m.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org> --- ldpd/socket.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ldpd/socket.c b/ldpd/socket.c index 1bb0837..eaea997 100644 --- a/ldpd/socket.c +++ b/ldpd/socket.c @@ -85,6 +85,8 @@ ldp_create_socket(int af, enum socket_type type) if (ldpd_privs.change(ZPRIVS_RAISE)) log_warn("%s: could not raise privs", __func__); if (sock_set_reuse(fd, 1) == -1) { + if (ldpd_privs.change(ZPRIVS_LOWER)) + log_warn("%s: could not lower privs", __func__); close(fd); return (-1); } -- 1.9.1
3338
Age (days ago)
3338
Last active (days ago)
0 comments
1 participants
participants (1)
-
Renato Westphal