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>
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;