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

svn at pcbsd.org svn at pcbsd.org
Thu Jun 14 08:21:46 PDT 2012


Author: kris
Date: 2012-06-14 15:21:44 +0000 (Thu, 14 Jun 2012)
New Revision: 17278

Added:
   pcbsd/current/src-qt4/pc-adsldap/icon.png
Modified:
   pcbsd/current/src-qt4/pc-adsldap/adsldap.cpp
   pcbsd/current/src-qt4/pc-adsldap/adsldap.h
   pcbsd/current/src-qt4/pc-adsldap/adsldap.ui
   pcbsd/current/src-qt4/pc-adsldap/pc-adsldap.qrc
Log:

Add initial glue to write /usr/local/etc/AD.conf settings



Modified: pcbsd/current/src-qt4/pc-adsldap/adsldap.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-adsldap/adsldap.cpp	2012-06-14 14:03:10 UTC (rev 17277)
+++ pcbsd/current/src-qt4/pc-adsldap/adsldap.cpp	2012-06-14 15:21:44 UTC (rev 17278)
@@ -98,7 +98,44 @@
 
 }
 
-void pcADSLDAP::exportSettings()
+void pcADSLDAP::exportAD()
 {
+  // Validate that passwords match
+  if ( lineADSAdminPW->text() != lineADSAdminPW2->text() )
+  {
+     QMessageBox::warning(this, tr("Active Directory Configuration"),
+                                tr("The Active Directory passwords specified do not match!"),
+                                QMessageBox::Ok,
+                                QMessageBox::Ok);
+      return;
+  }
 
+  QString ADCONF="/usr/local/etc/AD.conf";
+  QString tmp;
+
+  Utils::setConfFileValue( ADCONF, "ad_domainname", "ad_domainname=\"" + lineADSDomainName->text() + "\"", -1);
+  Utils::setConfFileValue( ADCONF, "ad_adminname", "ad_adminname=\"" + lineADSAdminName->text() + "\"", -1);
+  Utils::setConfFileValue( ADCONF, "ad_adminpw", "ad_adminpw=\"" + lineADSAdminPW->text() + "\"", -1);
+  Utils::setConfFileValue( ADCONF, "ad_workgroup", "ad_workgroup=\"" + lineADSWorkgroup->text() + "\"", -1);
+  Utils::setConfFileValue( ADCONF, "ad_netbiosname", "ad_netbiosname=\"" + lineADSNetBIOS->text() + "\"", -1);
+  Utils::setConfFileValue( ADCONF, "ad_domaincontroller", "ad_domaincontroller=\"" + lineADSDomainController->text() + "\"", -1);
+  if ( checkADSTrustedDomains->isChecked() )
+    tmp = "true";  
+  else
+    tmp = "false";  
+  Utils::setConfFileValue( ADCONF, "ad_trusteddomains", "ad_trusteddomains=\"" + tmp + "\"", -1);
 }
+
+void pcADSLDAP::exportLDAP()
+{
+
+}
+
+void pcADSLDAP::exportSettings()
+{
+  // Start adding AD.conf values
+  if ( groupADS->isChecked() )
+    exportAD();
+  if ( groupLDAP->isChecked() )
+    exportLDAP();
+}

Modified: pcbsd/current/src-qt4/pc-adsldap/adsldap.h
===================================================================
--- pcbsd/current/src-qt4/pc-adsldap/adsldap.h	2012-06-14 14:03:10 UTC (rev 17277)
+++ pcbsd/current/src-qt4/pc-adsldap/adsldap.h	2012-06-14 15:21:44 UTC (rev 17278)
@@ -31,6 +31,8 @@
    void saveSettings();
    void loadSettings();
    void exportSettings();
+   void exportAD();
+   void exportLDAP();
 
 signals:
 

Modified: pcbsd/current/src-qt4/pc-adsldap/adsldap.ui
===================================================================
(Binary files differ)

Index: pcbsd/current/src-qt4/pc-adsldap/icon.png
===================================================================
--- pcbsd/current/src-qt4/pc-adsldap/icon.png	2012-06-14 14:03:10 UTC (rev 17277)
+++ pcbsd/current/src-qt4/pc-adsldap/icon.png	2012-06-14 15:21:44 UTC (rev 17278)

Property changes on: pcbsd/current/src-qt4/pc-adsldap/icon.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
Modified: pcbsd/current/src-qt4/pc-adsldap/pc-adsldap.qrc
===================================================================
--- pcbsd/current/src-qt4/pc-adsldap/pc-adsldap.qrc	2012-06-14 14:03:10 UTC (rev 17277)
+++ pcbsd/current/src-qt4/pc-adsldap/pc-adsldap.qrc	2012-06-14 15:21:44 UTC (rev 17278)
@@ -1,4 +1,5 @@
 <RCC>
   <qresource>
+    <file>icon.png</file>
   </qresource>
 </RCC>



More information about the Commits mailing list