[PC-BSD Commits] r18425 - pcbsd/current/src-qt4/pc-adsldap

svn at pcbsd.org svn at pcbsd.org
Mon Aug 13 07:44:01 PDT 2012


Author: kris
Date: 2012-08-13 14:44:01 +0000 (Mon, 13 Aug 2012)
New Revision: 18425

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

Make sure AD / LDAP is running as root



Modified: pcbsd/current/src-qt4/pc-adsldap/main.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-adsldap/main.cpp	2012-08-13 14:42:59 UTC (rev 18424)
+++ pcbsd/current/src-qt4/pc-adsldap/main.cpp	2012-08-13 14:44:01 UTC (rev 18425)
@@ -18,6 +18,13 @@
    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);
+   }
+
+
    pcADSLDAP w;
 
    w.programInit();



More information about the Commits mailing list