Fix: lttng-relayd allow binding of privileged ports for non-root users
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 3 Jun 2016 18:05:21 +0000 (14:05 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 3 Jun 2016 18:05:21 +0000 (14:05 -0400)
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 <jeremie.galarneau@efficios.com>
src/bin/lttng-relayd/main.c

index a1e94dcbd67dace86d17392513917d78e290b999..6ad6566254260a8af071e2c2ce26348fd148486c 100644 (file)
@@ -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;
This page took 0.027232 seconds and 5 git commands to generate.