diff --git a/lam/lib/config.inc b/lam/lib/config.inc index 32a3d342..9f03e35b 100644 --- a/lam/lib/config.inc +++ b/lam/lib/config.inc @@ -117,9 +117,6 @@ class Config { // if "yes" use the new LDAP schema for Samba 3.x var $samba3; - // Samba 3 domain SIDs - var $domainSID; - // name of configuration file var $file; @@ -232,10 +229,6 @@ class Config { $this->samba3 = chop(substr($line, 8, strlen($line)-8)); continue; } - if (substr($line, 0, 11) == "domainSID: ") { - $this->domainSID = chop(substr($line, 11, strlen($line)-11)); - continue; - } } fclose($file); } @@ -252,7 +245,7 @@ class Config { $save_serverURL = $save_passwd = $save_admins = $save_suffusr = $save_suffgrp = $save_suffhst = $save_minUID = $save_maxUID = $save_minGID = $save_maxGID = $save_minMach = $save_maxMach = $save_usrlstatrr = $save_grplstatrr = $save_hstlstatrr = $save_maxlstent = $save_deflang = - $save_scriptPath = $save_scriptServer = $save_samba3 = $save_domainSID = $save_suffdom = + $save_scriptPath = $save_scriptServer = $save_samba3 = $save_suffdom = $save_suffmap = False; $file = fopen($conffile, "r"); $file_array = array(); @@ -375,11 +368,6 @@ class Config { $save_samba3 = True; continue; } - if (substr($file_array[$i], 0, 11) == "domainSID: ") { - $file_array[$i] = "domainSID: " . $this->domainSID . "\n"; - $save_domainSID = True; - continue; - } } // check if we have to add new entries (e.g. if user upgraded LAM and has an old config file) if (!$save_serverURL == True) array_push($file_array, "\n\n# server address (e.g. ldap://localhost:389 or ldaps://localhost:636)\n" . "serverURL: " . $this->ServerURL . "\n"); @@ -414,7 +402,6 @@ class Config { if (!$save_scriptPath == True) array_push($file_array, "\n\n# Path to external Script\n" . "scriptPath: " . $this->scriptPath . "\n"); if (!$save_scriptServer == True) array_push($file_array, "\n\n# Server of external Script\n" . "scriptServer: " . $this->scriptServer . "\n"); if (!$save_samba3 == True) array_push($file_array, "\n\n# Set to \"yes\" only if you use the new Samba 3.x schema.\n" . "samba3: " . $this->samba3 . "\n"); - if (!$save_domainSID == True) array_push($file_array, "\n\n# Samba 3 domain SID. Set only if you use the new Samba 3.x schema.\n" . "domainSID: " . $this->domainSID . "\n"); $file = fopen($conffile, "w"); if ($file) { for ($i = 0; $i < sizeof($file_array); $i++) fputs($file, $file_array[$i]); @@ -431,7 +418,6 @@ class Config { function printconf() { echo "" . _("Server address") . ": " . $this->ServerURL . "
"; echo "" . _("Samba 3.x schema") . ": " . $this->samba3 . "
"; - echo "" . _("Domain SID") . ": " . $this->domainSID . "
"; echo "" . _("UserSuffix") . ": " . $this->Suff_users . "
"; echo "" . _("GroupSuffix") . ": " . $this->Suff_groups . "
"; echo "" . _("HostSuffix") . ": " . $this->Suff_hosts . "
"; @@ -768,23 +754,6 @@ class Config { return true; } - // returns the Samba domain SID (Samba 3 only) - function get_domainSID() { - return $this->domainSID; - } - - // sets the Samba domain SID (Samba 3 only) - function set_domainSID($value) { - if (!$value) { // optional parameter - $this->domainSID = ""; - } - elseif (is_string($value) && eregi("^S-[0-9]-[0-9]-[0-9]{2,2}-[0-9]*-[0-9]*-[0-9]*$", $value)) { - $this->domainSID = $value; - } - else return false; - return true; - } - } diff --git a/lam/templates/config/confmain.php b/lam/templates/config/confmain.php index defef5fb..475454a2 100644 --- a/lam/templates/config/confmain.php +++ b/lam/templates/config/confmain.php @@ -60,7 +60,6 @@ if ($_POST['back'] || $_POST['submitconf']){ if ($_POST['maxlistentries']) $_SESSION['maxlistentries'] = $_POST['maxlistentries']; if ($_POST['lang']) $_SESSION['lang'] = $_POST['lang']; if ($_POST['samba3']) $_SESSION['samba3'] = $_POST['samba3']; - if ($_POST['domainSID']) $_SESSION['domainSID'] = $_POST['domainSID']; if ($_POST['scriptpath']) $_SESSION['scriptpath'] = $_POST['scriptpath']; else $_SESSION['scriptpath'] = ""; if ($_POST['scriptserver']) $_SESSION['scriptserver'] = $_POST['scriptserver']; @@ -162,15 +161,6 @@ if ($conf->get_samba3() == "yes") echo (" else echo (""); echo ("" . _("Help") . "\n"); -// new line -echo (" "); - -// Samba domain SID -echo ("". - _("Domain SID") . " **: ". - "get_domainSID() . "\">\n"); -echo ("" . _("Help") . "\n"); - echo (""); echo (""); echo ("

"); diff --git a/lam/templates/config/confsave.php b/lam/templates/config/confsave.php index f0554802..c64c20be 100644 --- a/lam/templates/config/confsave.php +++ b/lam/templates/config/confsave.php @@ -58,7 +58,6 @@ if ($_SESSION['lang']) $lang = $_SESSION['lang']; if ($_SESSION['scriptpath']) $scriptpath = $_SESSION['scriptpath']; if ($_SESSION['scriptserver']) $scriptserver = $_SESSION['scriptserver']; if ($_SESSION['samba3']) $samba3 = $_SESSION['samba3']; -if ($_SESSION['domainSID']) $domainSID = $_SESSION['domainSID']; if ($_SESSION['filename']) $filename = $_SESSION['filename']; // check if password is correct @@ -176,12 +175,6 @@ if (!$samba3) { exit; } -if (($samba3 == "yes") && !eregi("^S-[0-9]-[0-9]-[0-9]{2,2}-[0-9]*-[0-9]*-[0-9]*$", $domainSID)) { - echo ("" . _("Samba 3 domain SID is invalid!") . ""); - echo ("\n


" . _("Back to preferences...") . ""); - exit; -} - if ($scriptpath && !eregi("^/[a-z0-9_\\-]+(/[a-z0-9_\\.\\-]+)+$", $scriptpath)) { echo ("" . _("Script path is invalid!") . ""); echo ("\n


" . _("Back to preferences...") . ""); @@ -214,7 +207,6 @@ $conf->set_hostlistAttributes($hstlstattr); $conf->set_MaxListEntries($maxlistentries); $conf->set_defaultLanguage($lang); $conf->set_samba3($samba3); -$conf->set_domainSID($domainSID); $conf->set_scriptpath($scriptpath); $conf->set_scriptserver($scriptserver); @@ -263,7 +255,6 @@ unset($_SESSION['lang']); unset($_SESSION['scriptpath']); unset($_SESSION['scriptserver']); unset($_SESSION['samba3']); -unset($_SESSION['domainSID']); unset($_SESSION['filename']); ?> diff --git a/lam/tests/conf-test.php b/lam/tests/conf-test.php index afb7c898..ca52884b 100644 --- a/lam/tests/conf-test.php +++ b/lam/tests/conf-test.php @@ -54,7 +54,6 @@ $defaultlanguage = $conf->get_defaultlanguage(); $scriptpath = $conf->get_scriptPath(); $scriptServer = $conf->get_scriptServer(); $samba3 = $conf->get_samba3(); -$domainSID = $conf->get_domainSID(); echo ("done
"); // next we modify them and save lam.conf echo ("Changing preferences..."); @@ -81,7 +80,6 @@ $conf->set_defaultlanguage("de_AT:iso639_de:Deutsch (Oesterreich)"); $conf->set_scriptPath("/var/www/lam/lib/script"); $conf->set_scriptServer("127.0.0.1"); $conf->set_samba3("yes"); -$conf->set_domainSID("S-0-1-22-1234567890-1234567890-1234567890"); $conf->save(); echo ("done
"); // at last all preferences are read from lam.conf and compared @@ -112,7 +110,6 @@ if ($conf->get_defaultlanguage() != "de_AT:iso639_de:Deutsch (Oesterreich)") ech if ($conf->get_scriptPath() != "/var/www/lam/lib/script") echo ("
Saving script path failed!
"); if ($conf->get_scriptServer() != "127.0.0.1") echo ("
Saving script server failed!
"); if ($conf->get_samba3() != "yes") echo ("
Saving samba3 failed!
"); -if ($conf->get_domainSID() != "S-0-1-22-1234567890-1234567890-1234567890") echo ("
Saving domainSID failed!
"); echo ("done
"); // restore old values echo ("Restoring old preferences..."); @@ -139,7 +136,6 @@ $conf->set_defaultLanguage($defaultlanguage); $conf->set_scriptPath($scriptpath); $conf->set_scriptServer($scriptserver); $conf->set_samba3($samba3); -$conf->set_domainSID($domainSID); $conf->save(); echo ("done
"); // finished