mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
notify that root access is required
This commit is contained in:
@@ -336,6 +336,11 @@ int main(int argc, char** argv)
|
|||||||
signal(SIGCHLD, handle_children);
|
signal(SIGCHLD, handle_children);
|
||||||
signal(SIGALRM, handle_alarm);
|
signal(SIGALRM, handle_alarm);
|
||||||
|
|
||||||
|
if (getuid() != 0) {
|
||||||
|
fprintf(stderr, "This server requires root access to operate.\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
/* load configuration */
|
/* load configuration */
|
||||||
ret = cmd_parser(argc, argv, &config);
|
ret = cmd_parser(argc, argv, &config);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user