From 863b49eaec46f39feb96f11dda036b837cf54455 Mon Sep 17 00:00:00 2001 From: arcan1s Date: Mon, 11 Aug 2014 23:23:18 +0400 Subject: [PATCH] add euid checking to the helper --- sources/helper/src/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sources/helper/src/main.cpp b/sources/helper/src/main.cpp index 56d6acd..58000fe 100644 --- a/sources/helper/src/main.cpp +++ b/sources/helper/src/main.cpp @@ -79,6 +79,13 @@ int main(int argc, char *argv[]) (args[QString("version")].toBool()) || (args[QString("error")].toBool())) args[QString("nodaemon")] = true; + // heck euid + if (geteuid() != 0) { + cout << QCoreApplication::translate("NetctlHelper", "The helper is running with EUID %1. Some functions will not be available.") + .arg(QString::number(geteuid())).toUtf8().data() << endl; + cout << QCoreApplication::translate("NetctlHelper", "See security notes for more details.") + .toUtf8().data() << endl; + } // detach from console if (!args[QString("nodaemon")].toBool())