From: Jérémie Galarneau Date: Fri, 3 Jun 2016 18:05:21 +0000 (-0400) Subject: Fix: lttng-relayd allow binding of privileged ports for non-root users X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=commitdiff_plain;h=59a41fc4a023c6976a72621dc7cd978e34b5cb1c Fix: lttng-relayd allow binding of privileged ports for non-root users Non-root users could use authbind to bind to low-numbered ports. Moreover, the check was inverted; !getuid() will only be true for the root user. Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index a1e94dcbd..6ad656625 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -2793,15 +2793,6 @@ int main(int argc, char **argv) goto exit_init_data; } - /* Check if daemon is UID = 0 */ - if (!getuid()) { - if (control_uri->port < 1024 || data_uri->port < 1024 || live_uri->port < 1024) { - ERR("Need to be root to use ports < 1024"); - retval = -1; - goto exit_init_data; - } - } - /* Setup the thread apps communication pipe. */ if (create_relay_conn_pipe()) { retval = -1;