Skip to content

Commit

Permalink
mxqd: allow to be run as as non-root
Browse files Browse the repository at this point in the history
  • Loading branch information
donald authored and mariux committed Oct 16, 2015
1 parent 951865c commit 977f7fb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions mxqd.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,6 @@ int server_init(struct mxq_server *server, int argc, char *argv[])
exit(EX_USAGE);
}

if (getuid()) {
mx_log_err("Running mxqd as non-root user is not supported at the moment.");
exit(EX_USAGE);
}

memset(server, 0, sizeof(*server));

res = mx_mysql_initialize(&(server->mysql));
Expand Down Expand Up @@ -411,6 +406,10 @@ int server_init(struct mxq_server *server, int argc, char *argv[])
}
}

if (getuid()) {
mx_log_notice("Running mxqd as non-root user.");
}

res = mx_read_first_line_from_file("/proc/sys/kernel/random/boot_id", &str_bootid);
assert(res == 36);
assert(str_bootid);
Expand Down

0 comments on commit 977f7fb

Please sign in to comment.