summaryrefslogtreecommitdiffhomepage
path: root/config.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'config.cpp')
-rw-r--r--config.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/config.cpp b/config.cpp
index 072b1bd..6dbd8ee 100644
--- a/config.cpp
+++ b/config.cpp
@@ -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);
}
}
}