diff --git a/Applications/IRCClient/main.cpp b/Applications/IRCClient/main.cpp index b5e681730c..3ae27f77d6 100644 --- a/Applications/IRCClient/main.cpp +++ b/Applications/IRCClient/main.cpp @@ -27,6 +27,7 @@ #include "IRCAppWindow.h" #include "IRCClient.h" #include +#include #include int main(int argc, char** argv) @@ -36,6 +37,11 @@ int main(int argc, char** argv) return 1; } + if (getuid() == 0) { + fprintf(stderr, "Refusing to run as root\n"); + return 1; + } + GUI::Application app(argc, argv); if (pledge("stdio inet dns unix shared_buffer rpath", nullptr) < 0) {