Skip to content

Commit

Permalink
mxqd: require compiletime flag to run 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 71a8239 commit 55a81dc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mxqd.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,12 @@ int server_init(struct mxq_server *server, int argc, char *argv[])
}

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

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

0 comments on commit 55a81dc

Please sign in to comment.