diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2016-12-19 14:07:28 -0200 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-01-03 22:03:28 -0200 |
| commit | 07bc3833841ec104b10f48d936da18aaf6ddcf29 (patch) | |
| tree | 370a9735fa7a69e6d87e3da322fbdff3bdfab6c2 | |
| parent | 9c0b0e6753b110a7e0ba4229873a6c10cd8c6bd5 (diff) | |
ldpd: add missing privilege dropping on error path
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| -rw-r--r-- | ldpd/socket.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ldpd/socket.c b/ldpd/socket.c index 1bb0837401..eaea9973a0 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); } |
