[PC-BSD Commits] r18423 - pcbsd/current/src-qt4/pc-servicemanager

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


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

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

Check for root before starting



Modified: pcbsd/current/src-qt4/pc-servicemanager/main.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-servicemanager/main.cpp	2012-08-13 14:36:19 UTC (rev 18422)
+++ pcbsd/current/src-qt4/pc-servicemanager/main.cpp	2012-08-13 14:42:25 UTC (rev 18423)
@@ -35,6 +35,13 @@
          }
     }
 
+    // Make sure we are running as root
+    if (getuid() != 0) {
+       qDebug("Error, needs to be run as root");
+       exit(1);
+    }
+
+    //Init GUI
     ServiceManager w;
 
     w.ProgramInit(chroot, ip);



More information about the Commits mailing list