use preg-checks

This commit is contained in:
Roland Gruber 2004-09-26 15:55:29 +00:00
parent 61dffc68ac
commit 2c991d9075
4 changed files with 41 additions and 18 deletions

View File

@ -87,10 +87,14 @@ class inetOrgPerson extends baseModule {
2 => array('kind' => 'help', 'value' => 'TODO'))
);
// profile checks
$return['profile_checks']['inetOrgPerson_title'] = array('type' => 'regex_i', 'regex' => 'title',
$return['profile_checks']['inetOrgPerson_title'] = array(
'type' => 'ext_preg',
'regex' => 'title',
'error_message' => $this->messages['title'][0]);
$return['profile_checks']['inetOrgPerson_employeeType'] = array('type' => 'regex_i',
'regex' => 'employeeType', 'error_message' => $this->messages['employeeType'][0]);
$return['profile_checks']['inetOrgPerson_employeeType'] = array(
'type' => 'ext_preg',
'regex' => 'employeeType',
'error_message' => $this->messages['employeeType'][0]);
// available PDF fields
$return['PDF_fields'] = array( 'description',
'host',

View File

@ -136,15 +136,15 @@ class sambaAccount extends baseModule {
2 => array('kind' => 'help', 'value' => 'TODO')
);
// profile checks
$return['profile_checks']['sambaAccount_smbhome'] = array('type' => 'regex_i', 'regex' => 'UNC',
$return['profile_checks']['sambaAccount_smbhome'] = array('type' => 'ext_preg', 'regex' => 'UNC',
'error_message' => $this->messages['homePath'][0]);
$return['profile_checks']['sambaAccount_profilePath'] = array('type' => 'regex_i', 'regex' => 'UNC',
$return['profile_checks']['sambaAccount_profilePath'] = array('type' => 'ext_preg', 'regex' => 'UNC',
'error_message' => $this->messages['profilePath'][0]);
$return['profile_checks']['sambaAccount_scriptPath'] = array('type' => 'regex_i', 'regex' => 'logonScript',
$return['profile_checks']['sambaAccount_scriptPath'] = array('type' => 'ext_preg', 'regex' => 'logonScript',
'error_message' => $this->messages['logonScript'][0]);
$return['profile_checks']['sambaAccount_userWorkstations'] = array('type' => 'regex_i', 'regex' => 'unixhost',
$return['profile_checks']['sambaAccount_userWorkstations'] = array('type' => 'ext_preg', 'regex' => 'unixhost',
'error_message' => $this->messages['workstations'][0]);
$return['profile_checks']['sambaAccount_domain'] = array('type' => 'regex_i', 'regex' => 'domainname',
$return['profile_checks']['sambaAccount_domain'] = array('type' => 'ext_preg', 'regex' => 'domainname',
'error_message' => $this->messages['domain'][0]);
// available PDF fields
$return['PDF_fields'] = array( 'displayName',

View File

@ -69,13 +69,21 @@ class sambaSamAccount extends baseModule {
// module dependencies
$return['dependencies'] = array('depends' => array('posixAccount'), 'conflicts' => array());
// profile checks
$return['profile_checks']['sambaSamAccount_smbhome'] = array('type' => 'regex_i', 'regex' => 'UNC',
$return['profile_checks']['sambaSamAccount_smbhome'] = array(
'type' => 'ext_preg',
'regex' => 'UNC',
'error_message' => $this->messages['homePath'][0]);
$return['profile_checks']['sambaSamAccount_profilePath'] = array('type' => 'regex_i', 'regex' => 'UNC',
$return['profile_checks']['sambaSamAccount_profilePath'] = array(
'type' => 'ext_preg',
'regex' => 'UNC',
'error_message' => $this->messages['profilePath'][0]);
$return['profile_checks']['sambaSamAccount_logonScript'] = array('type' => 'regex_i', 'regex' => 'logonscript',
$return['profile_checks']['sambaSamAccount_logonScript'] = array(
'type' => 'ext_preg',
'regex' => 'logonscript',
'error_message' => $this->messages['logonScript'][0]);
$return['profile_checks']['sambaSamAccount_userWorkstations'] = array('type' => 'regex_i', 'regex' => 'unixhost',
$return['profile_checks']['sambaSamAccount_userWorkstations'] = array(
'type' => 'ext_preg',
'regex' => 'unixhost',
'error_message' => $this->messages['workstations'][0]);
// available PDF fields
$return['PDF_fields'] = array( 'displayName',

View File

@ -98,15 +98,26 @@ class shadowAccount extends baseModule {
2 => array('kind' => 'help', 'value' => 'TODO'))
);
// profile checks
$return['profile_checks']['shadowAccount_shadowMin'] = array('type' => 'regex', 'regex' => 'digit',
$return['profile_checks']['shadowAccount_shadowMin'] = array(
'type' => 'ext_preg',
'regex' => 'digit',
'error_message' => $this->messages['shadowMin'][0]);
$return['profile_checks']['shadowAccount_shadowMax'] = array('type' => 'regex', 'regex' => 'digit',
$return['profile_checks']['shadowAccount_shadowMax'] = array(
'type' => 'ext_preg',
'regex' => 'digit',
'error_message' => $this->messages['shadowMax'][0]);
$return['profile_checks']['shadowAccount_cmp'] = array('type' => 'int_greater', 'cmp_name1' => 'shadowAccount_shadowMax',
'cmp_name2' => 'shadowAccount_shadowMin', 'error_message' => $this->messages['shadow_cmp'][0]);
$return['profile_checks']['shadowAccount_shadowInactive'] = array('type' => 'regex', 'regex' => 'digit2',
$return['profile_checks']['shadowAccount_cmp'] = array(
'type' => 'int_greater',
'cmp_name1' => 'shadowAccount_shadowMax',
'cmp_name2' => 'shadowAccount_shadowMin',
'error_message' => $this->messages['shadow_cmp'][0]);
$return['profile_checks']['shadowAccount_shadowInactive'] = array(
'type' => 'ext_preg',
'regex' => 'digit2',
'error_message' => $this->messages['inactive'][0]);
$return['profile_checks']['shadowAccount_shadowWarning'] = array('type' => 'regex', 'regex' => 'digit',
$return['profile_checks']['shadowAccount_shadowWarning'] = array(
'type' => 'ext_preg',
'regex' => 'digit',
'error_message' => $this->messages['shadowWarning'][0]);
// available PDF fields
$return['PDF_fields'] = array( 'shadowLastChange',