diff options
Diffstat (limited to 'config.cpp')
-rw-r--r-- | config.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -87,7 +87,10 @@ void Config::readConfigfile(std::string filename) } else throw std::runtime_error("Unknown element: "s + x.first); } - m_sockets.push_back(socket_struct); + if (geteuid() != 0 && stoi(socket_struct.port) < 1024) + std::cout << "Warning: Skipping privileged port " << socket_struct.port << std::endl; + else + m_sockets.push_back(socket_struct); } } } |