[PC-BSD Commits] r18424 - pcbsd/current/src-qt4/pc-sysmanager

svn at pcbsd.org svn at pcbsd.org
Mon Aug 13 07:42:59 PDT 2012


Author: kris
Date: 2012-08-13 14:42:59 +0000 (Mon, 13 Aug 2012)
New Revision: 18424

Modified:
   pcbsd/current/src-qt4/pc-sysmanager/main.cpp
Log:

Make sure we are running as root



Modified: pcbsd/current/src-qt4/pc-sysmanager/main.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-sysmanager/main.cpp	2012-08-13 14:42:25 UTC (rev 18423)
+++ pcbsd/current/src-qt4/pc-sysmanager/main.cpp	2012-08-13 14:42:59 UTC (rev 18424)
@@ -20,6 +20,12 @@
    a.installTranslator( &translator );
    qDebug() << "Locale:" << langCode;
 
+   // Make sure we are running as root
+   if (getuid() != 0) {
+      qDebug("Error, needs to be run as root");
+      exit(1);
+   }
+
    PBSystemTab w;
 
    w.ProgramInit();



More information about the Commits mailing list