From 0a75fe91a01d8b0115699e9d997c2ff15bf7b6a8 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 1 Aug 2004 09:39:24 +0000 Subject: [PATCH] moved min/maxUID settings for users and hosts to posixAccount module --- lam/config/lam.conf_sample | 21 +++--- lam/help/help.inc | 6 +- lam/lib/config.inc | 106 +---------------------------- lam/lib/modules/posixAccount.inc | 102 +++++++++++++++++++++++++-- lam/session-vars.txt | 4 -- lam/templates/config/conflogin.php | 4 -- lam/templates/config/confmain.php | 36 ---------- lam/templates/config/confsave.php | 28 -------- lam/tests/conf-test.php | 16 ----- 9 files changed, 110 insertions(+), 213 deletions(-) diff --git a/lam/config/lam.conf_sample b/lam/config/lam.conf_sample index 2811e7b4..9b56289d 100644 --- a/lam/config/lam.conf_sample +++ b/lam/config/lam.conf_sample @@ -27,18 +27,6 @@ hostsuffix: ou=machines,dc=my-domain,dc=com # e.g. ou=domains,dc=yourdomain,dc=org domainsuffix: ou=domains,dc=my-domain,dc=com -# minimum and maximum UID numbers -minUID: 10000 -maxUID: 20000 - -# minimum and maximum GID numbers -minGID: 10000 -maxGID: 20000 - -# minimum and maximum UID numbers for Samba Hosts -minMachine: 25000 -maxMachine: 35000 - # list of attributes to show in user list # entries can either be predefined values (e.g. '#cn' or '#uid') # or individual ones (e.g. 'uid:User ID' or 'host:Host Name') @@ -75,3 +63,12 @@ cachetimeout: 5 # Password hash algorithm (CRYPT/MD5/SMD5/SHA/SSHA/PLAIN). pwdhash: SSHA +# Module settings + +modules: posixAccount_minUID: 10000 +modules: posixAccount_maxUID: 30000 +modules: posixAccount_minMachine: 50000 +modules: posixAccount_maxMachine: 60000 +modules: posixGroup_minGID: 10000 +modules: posixGroup_maxGID: 20000 + diff --git a/lam/help/help.inc b/lam/help/help.inc index cca557da..2dadc442 100644 --- a/lam/help/help.inc +++ b/lam/help/help.inc @@ -138,8 +138,7 @@ $helpArray = array ( "400" => array ("ext" => "FALSE", "Headline" => _("Username"), "Text" => _("Username of the user who should be created. Valid characters are: a-z,0-9, .-_. Lam does not allow a number as first character because useradd also does not allow it. Lam does not allow capital letters A-Z because it can cause several problems. If username is already used username will be expanded with a number. The next free number will be used. Warning: Older systems have problems with usernames longer than 8 characters. You can not log in to Windows if username is longer than 16 characters.")), "401" => array ("ext" => "FALSE", "Headline" => _("UID number"), - "Text" => _("If empty UID number will be generated automaticly. Valid values are between %s and %s."), - "variables" => array($_SESSION['config']->get_minUID(), $_SESSION['config']->get_maxUID())), + "Text" => _("If empty UID number will be generated automaticly.")), "402" => array ("ext" => "FALSE", "Headline" => _("Additional groups"), "Text" => _("Hold the CTRL-key to (de)select multiple groups."). ' '. _("Can be left empty.")), "403" => array ("ext" => "FALSE", "Headline" => _("Home directory"), @@ -159,8 +158,7 @@ $helpArray = array ( "410" => array ("ext" => "FALSE", "Headline" => _("Host name"), "Text" => _("Host name of the host which should be created. Valid characters are: a-z,0-9, .-_$. Lam does not allow a number as first character because useradd also does not allow it. Lam does not allow capital letters A-Z because it can cause several problems. Hostnames are always ending with $. If last character is not $ it will be added. If hostname is already used hostname will be expanded with a number. The next free number will be used.")), "411" => array ("ext" => "FALSE", "Headline" => _("UID number"), - "Text" => _("If empty UID number will be generated automaticly. Valid values are between %s and %s."), - "variables" => array($_SESSION['config']->get_minMachine(), $_SESSION['config']->get_maxMachine())), + "Text" => _("If empty UID number will be generated automaticly.")), "412" => array ("ext" => "FALSE", "Headline" => _("Primary group"), "Text" => _("The Primary group the host should be member of.")), "413" => array ("ext" => "FALSE", "Headline" => _("Gecos"), diff --git a/lam/lib/config.inc b/lam/lib/config.inc index 2dbf2b91..b085cc14 100644 --- a/lam/lib/config.inc +++ b/lam/lib/config.inc @@ -119,15 +119,6 @@ class Config { /** LDAP suffix for Samba 3 domains */ var $domainsuffix; - /** Minimum UID number for users */ - var $MinUID; - /** Maximum UID number for users */ - var $MaxUID; - /** Minimum UID number for Samba hosts */ - var $MinMachine; - /** Maximum UID number for Samba hosts */ - var $MaxMachine; - /** Attributes that are shown in the user list */ var $userlistAttributes; /** Attributes that are shown in the group list */ @@ -179,8 +170,7 @@ class Config { /** List of all settings in config file */ var $settings = array("ServerURL", "Passwd", "Admins", "usersuffix", "groupsuffix", "hostsuffix", - "domainsuffix", "MinUID", "MaxUID", "MinMachine", "MaxMachine", - "userlistAttributes", "grouplistAttributes", "hostlistAttributes", "maxlistentries", + "domainsuffix", "userlistAttributes", "grouplistAttributes", "hostlistAttributes", "maxlistentries", "defaultLanguage", "scriptPath", "scriptServer", "cachetimeout", "pwdhash", "usermodules", "groupmodules", "hostmodules", "modules"); @@ -292,10 +282,6 @@ class Config { "# e.g. ou=machines,dc=yourdomain,dc=org\n" . "hostsuffix: " . $this->hostsuffix . "\n"); if (!in_array("domainsuffix", $saved)) array_push($file_array, "\n\n# suffix of Samba 3 domains\n" . "# e.g. ou=domains,dc=yourdomain,dc=org\n" . "domainsuffix: " . $this->domainsuffix . "\n"); - if (!in_array("MinUID", $saved)) array_push($file_array, "\n\n# minimum UID number\n" . "minUID: " . $this->MinUID . "\n"); - if (!in_array("MaxUID", $saved)) array_push($file_array, "\n\n# maximum UID number\n" . "maxUID: " . $this->MaxUID . "\n"); - if (!in_array("MinMachine", $saved)) array_push($file_array, "\n\n# minimum UID number for Samba hosts\n" . "minMachine: " . $this->MinMachine . "\n"); - if (!in_array("MaxMachine", $saved)) array_push($file_array, "\n\n# maximum UID number for Samba hosts\n" . "maxMachine: " . $this->MaxMachine . "\n"); if (!in_array("userlistAttributes", $saved)) array_push($file_array, "\n\n# list of attributes to show in user list\n# entries can either be predefined values (e.g. '#cn' or '#uid')" . "\n# or individual ones (e.g. 'uid:User ID' or 'host:Host Name')\n# values have to be seperated by semicolons\n" . "userlistAttributes: " . $this->userlistAttributes . "\n"); if (!in_array("grouplistAttributes", $saved)) array_push($file_array, "\n\n# list of attributes to show in group list\n# entries can either be predefined values (e.g. '#cn' or '#gidNumber')" . @@ -340,10 +326,6 @@ class Config { echo "" . _("GroupSuffix") . ": " . $this->groupsuffix . "
\n"; echo "" . _("HostSuffix") . ": " . $this->hostsuffix . "
\n"; echo "" . _("DomainSuffix") . ": " . $this->domainsuffix . "
\n"; - echo "" . _("Minimum UID number") . ": " . $this->MinUID . "
\n"; - echo "" . _("Maximum UID number") . ": " . $this->MaxUID . "
\n"; - echo "" . _("Minimum Machine number") . ": " . $this->MinMachine . "
\n"; - echo "" . _("Maximum Machine number") . ": " . $this->MaxMachine . "
\n"; echo "" . _("Attributes in User List") . ": " . $this->userlistAttributes . "
\n"; echo "" . _("Attributes in Group List") . ": " . $this->grouplistAttributes . "
\n"; echo "" . _("Attributes in Host List") . ": " . $this->hostlistAttributes . "
\n"; @@ -541,92 +523,6 @@ class Config { return true; } - /** - * Returns the minimum UID to use when creating new users - * - * @return the minimum UID number - */ - function get_minUID() { - return $this->MinUID; - } - - /** - * Sets the minimum UID to use when creating new users - * - * @param $value new minimum UID number - * @return true if $value has correct format - */ - function set_minUID($value) { - if (is_numeric($value)) $this->MinUID = $value; - else return false; - return true; - } - - /** - * Returns the maximum UID to use when creating new users - * - * @return the maximum UID number - */ - function get_maxUID() { - return $this->MaxUID; - } - - /** - * Sets the maximum UID to use when creating new users - * - * @param $value new maximum UID number - * @return true if $value has correct format - */ - function set_maxUID($value) { - if (is_numeric($value)) $this->MaxUID = $value; - else return false; - return true; - } - - /** - * Returns the minimum UID to use when creating new Samba hosts - * - * @return the minimum UID number - */ - function get_minMachine() { - return $this->MinMachine; - } - - /** - * Sets the minimum UID to use when creating new Samba hosts - * - * @param $value new minimum UID number - * @return true if $value has correct format - */ - function set_minMachine($value) { - if (! $value && ($this->hostsuffix == "")) $this->MinMachine = ""; - elseif (is_numeric($value)) $this->MinMachine = $value; - else return false; - return true; - } - - /** - * Returns the maximum UID to use when creating new Samba hosts - * - * @return the maximum UID number - */ - function get_maxMachine() { - return $this->MaxMachine; - } - - /** - * Sets the maximum UID to use when creating new Samba hosts - * - * @param $value new maximum UID number - * @return true if $value has correct format - */ - function set_maxMachine($value) { - if (! $value && ($this->hostsuffix == "")) $this->MaxMachine = ""; - elseif (is_numeric($value)) $this->MaxMachine = $value; - else return false; - return true; - } - /** * Returns the list of attributes to show in user list * diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc index 1f0e2b72..33716a63 100644 --- a/lam/lib/modules/posixAccount.inc +++ b/lam/lib/modules/posixAccount.inc @@ -60,6 +60,13 @@ class posixAccount extends baseModule { function posixAccount($scope) { // error messages for input checks $this->messages['homedir'] = array('ERROR', _('Home directory'), _('Homedirectory contains invalid characters.')); + $this->messages['minUID'] = array('ERROR', _('Users') . ':  ' . _('Minimum UID number'), _("Minimum UID number is invalid!")); + $this->messages['maxUID'] = array('ERROR', _('Users') . ':  ' . _('Maximum UID number'), _("Maximum UID number is invalid!")); + $this->messages['minMachine'] = array('ERROR', _('Hosts') . ':  ' . _('Minimum UID number'), _("Minimum UID number is invalid!")); + $this->messages['maxMachine'] = array('ERROR', _('Hosts') . ':  ' . _('Maximum UID number'), _("Maximum UID number is invalid!")); + $this->messages['cmp_UID'] = array('ERROR', _('Users') . ':  ' . _('Maximum UID number'), _("Maximum UID number must be greater than minimum UID number!")); + $this->messages['cmp_Machine'] = array('ERROR', _('Hosts') . ':  ' . _('Maximum UID number'), _("Maximum UID number must be greater than minimum UID number!")); + $this->messages['cmp_both'] = array('ERROR', _('UID ranges'), _("The UID ranges for users and hosts overlap! This is a problem because LAM uses the highest UID in use + 1. Please set the minimum UID to equal values or use independent ranges.")); // call parent constructor parent::baseModule($scope); } @@ -91,6 +98,35 @@ class posixAccount extends baseModule { // profile checks $return['profile_checks']['posixAccount_homeDirectory'] = array('type' => 'regex_i', 'regex' => $this->regex_homedir, 'error_message' => $this->messages['homedir']); + // configuration options + $return['config_options']['user'] = array( + array( + 0 => array('kind' => 'text', 'text' => '' . _("Users") . ':  ' . _('Minimum UID number') . ": "), + 1 => array('kind' => 'input', 'name' => 'posixAccount_minUID', 'type' => 'text', 'size' => '10', 'maxlength' => '255'), + 2 => array('kind' => 'text', 'value' => ' '), + 3 => array('kind' => 'text', 'text' => _('Maximum UID number') . ": "), + 4 => array('kind' => 'input', 'name' => 'posixAccount_maxUID', 'type' => 'text', 'size' => '10', 'maxlength' => '255'), + 5 => array('kind' => 'help', 'value' => 'TODO')) + ); + $return['config_options']['host'] = array( + array( + 0 => array('kind' => 'text', 'text' => '' . _("Hosts") . ':  ' . _('Minimum UID number') . ": "), + 1 => array('kind' => 'input', 'name' => 'posixAccount_minMachine', 'type' => 'text', 'size' => '10', 'maxlength' => '255'), + 2 => array('kind' => 'text', 'value' => ' '), + 3 => array('kind' => 'text', 'text' => _('Maximum UID number') . ": "), + 4 => array('kind' => 'input', 'name' => 'posixAccount_maxMachine', 'type' => 'text', 'size' => '10', 'maxlength' => '255'), + 5 => array('kind' => 'help', 'value' => 'TODO')) + ); + // configuration descriptions + $return['config_descriptions'] = array( + 'legend' => _("UID ranges for Unix accounts"), + 'descriptions' => array( + 'posixAccount_minUID' => _("Minimum UID number for Unix accounts (users)"), + 'posixAccount_maxUID' => _("Maximum UID number for Unix accounts (users)"), + 'posixAccount_minMachine' => _("Minimum UID number for Unix accounts (hosts)"), + 'posixAccount_maxMachine' => _("Maximum UID number for Unix accounts (hosts)"), + ) + ); return $return; } @@ -418,12 +454,12 @@ class posixAccount extends baseModule { // Check if UID is valid. If none value was entered, the next useable value will be inserted // load min and may uidNumber if ($_SESSION[$this->base]->type=='user') { - $minID = intval($_SESSION[$_SESSION[$this->base]->config]->get_minUID()); - $maxID = intval($_SESSION[$_SESSION[$this->base]->config]->get_maxUID()); + $minID = intval($this->moduleSettings['posixAccount_minUID'][0]); + $maxID = intval($this->moduleSettings['posixAccount_maxUID'][0]); } if ($_SESSION[$this->base]->type=='host') { - $minID = intval($_SESSION[$_SESSION[$this->base]->config]->get_minMachine()); - $maxID = intval($_SESSION[$_SESSION[$this->base]->config]->get_maxMachine()); + $minID = intval($this->moduleSettings['posixAccount_minMachine'][0]); + $maxID = intval($this->moduleSettings['posixAccount_maxMachine'][0]); } $dn_uids = $_SESSION[$_SESSION[$this->base]->cache]->get_cache('uidNumber', 'posixAccount', '*'); // get_cache will return an array ( dn1 => array(uidnumber1), dn2 => array(uidnumber2), ... ) @@ -747,6 +783,64 @@ class posixAccount extends baseModule { ); } + /** + * Checks input values of module settings. + * + * @param array $scopes list of account types which are used + * @param array $options hash array containing the settings (array('option' => array('value'))) + * @return array list of error messages + */ + function check_configOptions($scopes, $options) { + $return = array(); + // user settings + if (in_array('user', $scopes)) { + // min/maxUID are required, check if they are numeric + if (!isset($options['posixAccount_minUID'][0]) || !ereg('^[0-9]+$', $options['posixAccount_minUID'][0])) { + $return[] = $this->messages['minUID']; + } + if (!isset($options['posixAccount_maxUID'][0]) || !ereg('^[0-9]+$', $options['posixAccount_maxUID'][0])) { + $return[] = $this->messages['maxUID']; + } + // minUID < maxUID + if (isset($options['posixAccount_minUID'][0]) && isset($options['posixAccount_maxUID'][0])) { + if ($options['posixAccount_minUID'][0] > $options['posixAccount_maxUID'][0]) { + $return[] = $this->messages['cmp_UID']; + } + } + } + // host settings + if (in_array('host', $scopes)) { + // min/maxUID are required, check if they are numeric + if (!isset($options['posixAccount_minMachine'][0]) || !ereg('^[0-9]+$', $options['posixAccount_minMachine'][0])) { + $return[] = $this->messages['minMachine']; + } + if (!isset($options['posixAccount_maxMachine'][0]) || !ereg('^[0-9]+$', $options['posixAccount_maxMachine'][0])) { + $return[] = $this->messages['maxMachine']; + } + // minUID < maxUID + if (isset($options['posixAccount_minMachine'][0]) && isset($options['posixAccount_maxMachine'][0])) { + if ($options['posixAccount_minMachine'][0] > $options['posixAccount_maxMachine'][0]) { + $return[] = $this->messages['cmp_Machine']; + } + } + } + // check if user and host ranges overlap + if (in_array('user', $scopes) && in_array('host', $scopes)) { + if (isset($options['posixAccount_minUID'][0]) && isset($options['posixAccount_maxUID'][0]) && + isset($options['posixAccount_minMachine'][0]) && isset($options['posixAccount_maxMachine'][0])) { + if (($options['posixAccount_minMachine'][0] > $options['posixAccount_minUID'][0]) && + ($options['posixAccount_minMachine'][0] < $options['posixAccount_maxUID'][0])) { + $return[] = $this->messages['cmp_both']; + } + if (($options['posixAccount_minUID'][0] > $options['posixAccount_minMachine'][0]) && + ($options['posixAccount_minUID'][0] < $options['posixAccount_maxMachine'][0])) { + $return[] = $this->messages['cmp_both']; + } + } + } + return $return; + } + } ?> diff --git a/lam/session-vars.txt b/lam/session-vars.txt index 83afa43e..9d005fd1 100644 --- a/lam/session-vars.txt +++ b/lam/session-vars.txt @@ -66,10 +66,6 @@ convsave, confmain, conflogin: - conf_suffgroups: Eingabe von confmain - conf_suffhosts: Eingabe von confmain - conf_suffdomains: Eingabe von confmain -- conf_minUID: Eingabe von confmain -- conf_maxUID: Eingabe von confmain -- conf_minMach: Eingabe von confmain -- conf_maxMach: Eingabe von confmain - conf_usrlstattr: Eingabe von confmain - conf_grplstattr: Eingabe von confmain - conf_hstlstattr: Eingabe von confmain diff --git a/lam/templates/config/conflogin.php b/lam/templates/config/conflogin.php index 0fb58a22..8001cedc 100644 --- a/lam/templates/config/conflogin.php +++ b/lam/templates/config/conflogin.php @@ -50,10 +50,6 @@ unset($_SESSION['conf_admins']); unset($_SESSION['conf_suffusers']); unset($_SESSION['conf_suffgroups']); unset($_SESSION['conf_suffhosts']); -unset($_SESSION['conf_minUID']); -unset($_SESSION['conf_maxUID']); -unset($_SESSION['conf_minMach']); -unset($_SESSION['conf_maxMach']); unset($_SESSION['conf_usrlstattr']); unset($_SESSION['conf_grplstattr']); unset($_SESSION['conf_hstlstattr']); diff --git a/lam/templates/config/confmain.php b/lam/templates/config/confmain.php index 001f47c9..a612810e 100644 --- a/lam/templates/config/confmain.php +++ b/lam/templates/config/confmain.php @@ -57,10 +57,6 @@ if ($_POST['back'] || $_POST['submitconf'] || $_POST['editmodules']){ $_SESSION['conf_suffgroups'] = $_POST['suffgroups']; $_SESSION['conf_suffhosts'] = $_POST['suffhosts']; $_SESSION['conf_suffdomains'] = $_POST['suffdomains']; - $_SESSION['conf_minUID'] = $_POST['minUID']; - $_SESSION['conf_maxUID'] = $_POST['maxUID']; - $_SESSION['conf_minMach'] = $_POST['minMach']; - $_SESSION['conf_maxMach'] = $_POST['maxMach']; $_SESSION['conf_usrlstattr'] = $_POST['usrlstattr']; $_SESSION['conf_grplstattr'] = $_POST['grplstattr']; $_SESSION['conf_hstlstattr'] = $_POST['hstlstattr']; @@ -127,10 +123,6 @@ if ($_GET["modulesback"] == "true") { $conf->set_GroupSuffix($_SESSION['conf_suffgroups']); $conf->set_HostSuffix($_SESSION['conf_suffhosts']); $conf->set_DomainSuffix($_SESSION['conf_suffdomains']); - $conf->set_minUID($_SESSION['conf_minUID']); - $conf->set_maxUID($_SESSION['conf_maxUID']); - $conf->set_minMachine($_SESSION['conf_minMach']); - $conf->set_maxMachine($_SESSION['conf_maxMach']); $conf->set_userlistAttributes($_SESSION['conf_usrlstattr']); $conf->set_grouplistAttributes($_SESSION['conf_grplstattr']); $conf->set_hostlistAttributes($_SESSION['conf_hstlstattr']); @@ -297,34 +289,6 @@ for ($m = 0; $m < sizeof($modules); $m++) { } -echo ("
" . _("Ranges") . ""); -echo (""); - -// minUID -echo ("\n"); -echo "\n"; -// maxUID -echo ("\n"); -// UID text -echo ("\n"); -// minMach -echo ("\n"); -echo "\n"; -// maxMach -echo ("\n"); -// Machine text -echo ("\n"); - -echo ("
". - _("Minimum UID number") . " *: ". - "get_minUID() . "\">   " . _("Maximum UID number") . " *: ". - "get_maxUID() . "\">" . _("Help") . "
". - _("Minimum Machine number") . " **: ". - "get_minMachine() . "\">   " . _("Maximum Machine number") . " **: ". - "get_maxMachine() . "\">" . _("Help") . "
\n"); -echo ("
\n"); -echo ("

\n"); - echo ("
" . _("LDAP List settings") . "\n"); echo ("\n"); diff --git a/lam/templates/config/confsave.php b/lam/templates/config/confsave.php index 5387bc83..b06ec665 100644 --- a/lam/templates/config/confsave.php +++ b/lam/templates/config/confsave.php @@ -52,10 +52,6 @@ $suffusers = $_SESSION['conf_suffusers']; $suffgroups = $_SESSION['conf_suffgroups']; $suffhosts = $_SESSION['conf_suffhosts']; $suffdomains = $_SESSION['conf_suffdomains']; -$minUID = $_SESSION['conf_minUID']; -$maxUID = $_SESSION['conf_maxUID']; -$minMach = $_SESSION['conf_minMach']; -$maxMach = $_SESSION['conf_maxMach']; $usrlstattr = $_SESSION['conf_usrlstattr']; $grplstattr = $_SESSION['conf_grplstattr']; $hstlstattr = $_SESSION['conf_hstlstattr']; @@ -119,26 +115,6 @@ if (!$conf->set_DomainSuffix($suffdomains)) { echo ("\n


" . _("Back to preferences...") . ""); exit; } -if (!$conf->set_minUID($minUID)) { - echo ("" . _("Minimum UID number is invalid!") . ""); - echo ("\n


" . _("Back to preferences...") . ""); - exit; -} -if (!$conf->set_maxUID($maxUID)) { - echo ("" . _("Maximum UID number is invalid!") . ""); - echo ("\n


" . _("Back to preferences...") . ""); - exit; -} -if (!$conf->set_minMachine($minMach)) { - echo ("" . _("Minimum Machine number is invalid!") . ""); - echo ("\n


" . _("Back to preferences...") . ""); - exit; -} -if (!$conf->set_maxMachine($maxMach)) { - echo ("" . _("Maximum Machine number is invalid!") . ""); - echo ("\n


" . _("Back to preferences...") . ""); - exit; -} if (!$conf->set_userlistAttributes($usrlstattr)) { echo ("" . _("User list attributes are invalid!") . ""); echo ("\n


" . _("Back to preferences...") . ""); @@ -283,10 +259,6 @@ unset($_SESSION['conf_suffusers']); unset($_SESSION['conf_suffgroups']); unset($_SESSION['conf_suffhosts']); unset($_SESSION['conf_suffdomains']); -unset($_SESSION['conf_minUID']); -unset($_SESSION['conf_maxUID']); -unset($_SESSION['conf_minMach']); -unset($_SESSION['conf_maxMach']); unset($_SESSION['conf_usrlstattr']); unset($_SESSION['conf_grplstattr']); unset($_SESSION['conf_hstlstattr']); diff --git a/lam/tests/conf-test.php b/lam/tests/conf-test.php index cec40b2c..4db4194a 100644 --- a/lam/tests/conf-test.php +++ b/lam/tests/conf-test.php @@ -39,10 +39,6 @@ $Suff_users = $conf->get_UserSuffix(); $Suff_groups = $conf->get_GroupSuffix(); $Suff_hosts = $conf->get_HostSuffix(); $Suff_domains = $conf->get_DomainSuffix(); -$MinUID = $conf->get_minUID(); -$MaxUID = $conf->get_maxUID(); -$MinMachine = $conf->get_minMachine(); -$MaxMachine = $conf->get_maxMachine(); $userlistAttributes = $conf->get_userlistAttributes(); $grouplistAttributes = $conf->get_grouplistAttributes(); $hostlistAttributes = $conf->get_hostlistAttributes(); @@ -63,10 +59,6 @@ $conf->set_UserSuffix("ou=test,o=test,c=de"); $conf->set_GroupSuffix("ou=testgrp,o=test,c=de"); $conf->set_HostSuffix("ou=testhst,o=test,c=de"); $conf->set_DomainSuffix("ou=testdom,o=test,c=de"); -$conf->set_minUID("25"); -$conf->set_maxUID("254"); -$conf->set_minMachine("3"); -$conf->set_maxMachine("47"); $conf->set_userlistAttributes("#uid;#cn"); $conf->set_grouplistAttributes("#gidNumber;#cn;#memberUID"); $conf->set_hostlistAttributes("#cn;#uid;#description"); @@ -89,10 +81,6 @@ if ($conf2->get_UserSuffix() != "ou=test,o=test,c=de") echo ("
get_GroupSuffix() != "ou=testgrp,o=test,c=de") echo ("
Saving group suffix failed!
"); if ($conf2->get_HostSuffix() != "ou=testhst,o=test,c=de") echo ("
Saving host suffix failed!
"); if ($conf2->get_DomainSuffix() != "ou=testdom,o=test,c=de") echo ("
Saving domain suffix failed!
"); -if ($conf2->get_minUID() != "25") echo ("
Saving minUID failed!
"); -if ($conf2->get_maxUID() != "254") echo ("
Saving maxUID failed!
"); -if ($conf2->get_minMachine() != "3") echo ("
Saving maxMachine failed!
"); -if ($conf2->get_maxMachine() != "47") echo ("
Saving minMachine failed!
"); if ($conf2->get_userlistAttributes() != "#uid;#cn") echo ("
Saving userlistAttributes failed!
"); if ($conf2->get_grouplistAttributes() != "#gidNumber;#cn;#memberUID") echo ("
Saving grouplistAttributes failed!
"); if ($conf2->get_hostlistAttributes() != "#cn;#uid;#description") echo ("
Saving hostlistAttributes failed!
"); @@ -114,10 +102,6 @@ $conf2->set_UserSuffix($Suff_users); $conf2->set_GroupSuffix($Suff_groups); $conf2->set_HostSuffix($Suff_hosts); $conf2->set_DomainSuffix($Suff_domains); -$conf2->set_minUID($MinUID); -$conf2->set_maxUID($MaxUID); -$conf2->set_minMachine($MinMachine); -$conf2->set_maxMachine($MaxMachine); $conf2->set_userlistAttributes($userlistAttributes); $conf2->set_grouplistAttributes($grouplistAttributes); $conf2->set_hostlistAttributes($hostlistAttributes);