1
0
mirror of https://github.com/SuperBFG7/ympd synced 2025-11-24 01:04:49 +00:00

Dont run under uid 0

Optimize mkdebug.sh and mkrelease.sh
This commit is contained in:
jcorporation
2018-06-21 23:15:54 +01:00
parent 1f81588973
commit 7cff777d05
4 changed files with 33 additions and 17 deletions

View File

@@ -103,7 +103,7 @@ int main(int argc, char **argv)
struct mg_connection *nc;
unsigned int current_timer = 0, last_timer = 0;
char *run_as_user = NULL;
char *webport = "8080";
char *webport = "80";
mpd.port = 6600;
strcpy(mpd.host, "127.0.0.1");
streamport = 8000;
@@ -204,6 +204,11 @@ int main(int argc, char **argv)
return EXIT_FAILURE;
}
}
if (getuid() == 0) {
printf("myMPD should not be run with root privileges\n");
return EXIT_FAILURE;
}
mg_set_protocol_http_websocket(nc);
s_http_server_opts.document_root = SRC_PATH;