Code

Added error handling to rpc class
[gosa.git] / gosa-core / include / class_core.inc
1 <?php
4 class all extends plugin {
5     static function plInfo()
6     {
7         return (array(
8                     "plShortName"   => _("All"),
9                     "plDescription" => _("All objects"),
10                     "plSelfModify"  => TRUE,
11                     "plDepends"     => array(),
12                     "plPriority"    => 0,
13                     "plSection"     => array("administration"),
14                     "plCategory"    => array("all" => array("description" => '*&nbsp;'._("All"))),
15                     "plProvidedAcls"    => array())
16                );
17     }
18 }
20 class core extends plugin {
22     static function getPropertyValues($class,$name,$value,$type)
23     {
24         $list = array();
25         switch($name){
26             case 'idAllocationMethod':
27                 $list = array('traditional' => _('Traditional'), 'pool' => _('Use samba pool'));
28                 break;
29             case 'passwordDefaultHash':
30                 $tmp = passwordMethod::get_available_methods();
31                 foreach($tmp['name'] as $id => $method){
32                     $desc = $tmp[$id]['name'];
33                     $list[$method] = $desc;
34                 }
35                 break;
36             case 'theme':
37                 $cmd = "cd ../ihtml/themes; find . -name 'img.styles' | sed s/'^[^\/]*\/\([^\/]*\).*'/'\\1'/g";
38                 $res = `$cmd`  ; 
39                 $list = array();
40                 foreach(preg_split("/\n/",$res) as $entry){
41                     if(!empty($entry)){
42                         $list[$entry] = $entry;
43                     }
44                 }
45                 break;
46             case 'accountPrimaryAttribute':
47                 $list = array('uid' => 'uid', 'cn' => 'cn');
48                 break;
49             case 'loginAttribute':
50                 $list = array(
51                             'uid' => 'uid',
52                             'mail' => 'mail',
53                             'both' => 'uid & mail');
54                 break;
55             case 'timezone': 
56                 $tmp = timezone::_get_tz_zones();
57                 foreach($tmp['TIMEZONES'] as $name => $offset){
58                     if($offset >= 0){
59                         $list[$name] = $name." ( + ".sprintf("%0.2f",$offset/(60*60))." "._("hours").")";
60                     }else{
61                         $offset = $offset * -1;
62                         $list[$name] = $name." ( - ".sprintf("%0.2f",($offset/(60*60)))." "._("hours").")";
63                     }
64                 }
65                 break;
66             case 'mailAttribute':
67                 $list = array('mail' => 'mail','uid' => 'uid');
68                 break;
69             case 'mailMethod': 
70                 $list = mailMethod::get_methods();
71                 $list[''] = _("None");
72                 break;
73             case 'language':
74                 $tmp = get_languages(TRUE);
75                 $list[""] = _("Automatic");
76                 foreach($tmp as $key => $desc){
77                     $list[$key] = $desc;
78                 }
79                 break;
80             case 'modificationDetectionAttribute': 
81                 $list = array('entryCSN' => 'entryCSN (OpenLdap)','textCSN'=>'textCSN (Sun DS)');
82                 break;
83             default: echo $name." ";$list = array();
84         }
86         if(!isset($list[$value])){
87             $list[$value] = $value." ("._("User value").")";
88         }
90         return($list);
91     }
93     static function plInfo()
94     {
95         return (array(
96                     "plShortName" => _("Core"),
97                     "plDescription" => _("GOsa core plugin"),
98                     "plSelfModify"  => FALSE,
99                     "plDepends"     => array(),
100                     "plPriority"    => 0,
101                     "plSection"     => array("administration"),
103                     "plRequirements"=> array(
104                         'ldapSchema' => array(
105                             'gosaObject' => '>=2.7',
106                             'gosaAccount' => '>=2.7',
107                             'gosaLockEntry' => '>=2.7',
108                             'gosaDepartment' => '>=2.7',
109                             'gosaCacheEntry' => '>=2.7',
110                             'gosaProperties' => '>=2.7',
111                             'gosaConfig' => '>=2.7'
112                             ),
113                         'onFailureDisablePlugin' => array(get_class())
114                         ),
118                     "plCategory"    => array("all"),
119                     "plProperties"  => array(
121                         array(
122                             "name"          => "htaccessAuthentication",
123                             "type"          => "bool",
124                             "default"       => "false",
125                             "description"   => _("The 'htaccessAuthentication' variable tells GOsa to use either htaccess authentication or LDAP authentication. This can be used if you want to use i.e. kerberos to authenticate the users."),
126                             "check"         => "gosaProperty::isBool",
127                             "migrate"       => "",
128                             "group"         => "authentification",
129                             "mandatory"     => TRUE),
131                         array(
132                             "name"          => "logging",
133                             "type"          => "bool",
134                             "default"       => "true",
135                             "description"   => _("The 'logging' statement enables event logging on GOsa side. Setting it to 'true' GOsa will log every action a user performs via syslog. If you use rsyslog and configure it to mysql logging, you can browse all events within GOsa. GOsa will not log anything, if the logging value is empty or set to 'false'."),
137                             "check"         => "gosaProperty::isBool",
138                             "migrate"       => "",
139                             "group"         => "core",
140                             "mandatory"     => TRUE),
142                         array(
143                                 "name"          => "listSummary",
144                                 "type"          => "bool",
145                                 "default"       => "true",
146                                 "description"   => _("The 'listSummary' statement determines whether a status bar will be shown on the bottom of GOsa generated lists, displaying a short summary of type and number of elements in the list."),
147                                 "check"         => "gosaProperty::isBool",
148                                 "migrate"       => "",
149                                 "group"         => "visual",
150                                 "mandatory"     => FALSE),
152                         array(
153                                 "name"          => "passwordMinLength",
154                                 "type"          => "integer",
155                                 "default"       => "",
156                                 "description"   => _("The 'passwordMinLength' statement determines whether a newly entered password has to be of a minimum length."),
157                                 "check"         => "gosaProperty::isInteger",
158                                 "migrate"       => "",
159                                 "group"         => "password",
160                                 "mandatory"     => FALSE),
162                         array(
163                                 "name"          => "passwordMinDiffer",
164                                 "type"          => "integer",
165                                 "default"       => "",
166                                 "description"   => _("The 'passwordMinDiffer' statement determines whether a newly entered password has to be checked to have at least n different characters."),
167                                 "check"         => "gosaProperty::isInteger",
168                                 "migrate"       => "",
169                                 "group"         => "password",
170                                 "mandatory"     => FALSE),
172                         array(
173                                 "name"          => "passwordHook",
174                                 "type"          => "command",
175                                 "default"       => "",
176                                 "description"   => 
177                                 _("The 'passwordHook' can specify an external script to handle password settings at some other location besides the LDAP.")."&nbsp;".sprintf(_("It will be called this way: %s"),"/path/to/your/script \"username\" \"oldpassword\" \"newpassword\""),
178                         "check"         => "gosaProperty::isCommand",
179                                 "migrate"       => "",
180                                 "group"         => "password",
181                                 "mandatory"     => FALSE),
183                         array(
184                                 "name"          => "displayErrors",
185                                 "type"          => "bool",
186                                 "default"       => "false",
187                                 "description"   => _("The 'displayErrors' statement tells GOsa to show PHP errors in the upper part of the screen. This should be disabled in productive deployments, because there might be some important passwords arround.")." ".sprintf(_("The property '%s' may be interesting too."),'developmentMode'),
188                                 "check"         => "gosaProperty::isBool",
189                                 "migrate"       => "",
190                                 "group"         => "debug",
191                                 "mandatory"     => TRUE),
193                         array(
194                                 "name"          => "developmentMode",
195                                 "type"          => "bool",
196                                 "default"       => "false",
197                                 "description"   => _("The 'developmentMode' statement tells GOsa to show development related error messages, for example messages about missing ACL configuration or classes. Due to the fact that enabling this flag will result in a lot of false error messages it should only be enabled while developing or debugging plugins!"),
198                                 "check"         => "gosaProperty::isBool",
199                                 "migrate"       => "",
200                                 "group"         => "debug",
201                                 "mandatory"     => TRUE),
204                         array(
205                                 "name"          => "schemaCheck",
206                                 "type"          => "bool",
207                                 "default"       => "true",
208                                 "description"   => _("The 'schemaCheck' statement enables or disables schema checking during login. It is recommended to switch this on in order to let GOsa handle object creation more efficient."),
209                                 "check"         => "gosaProperty::isBool",
210                                 "migrate"       => "",
211                                 "group"         => "debug",
212                                 "mandatory"     => TRUE),
214                         array(
215                                 "name"          => "copyPaste",
216                                 "type"          => "bool",
217                                 "default"       => "false",
218                                 "description"   => _("The 'copyPaste' statement enables copy and paste for LDAP entries managed with GOsa."),
219                                 "check"         => "gosaProperty::isBool",
220                                 "migrate"       => "",
221                                 "group"         => "copyPaste",
222                                 "mandatory"     => TRUE),
224                         array(
225                                 "name"          => "forceGlobals",
226                                 "type"          => "bool",
227                                 "default"       => "false",
228                                 "description"   => _("The 'forceGlobals' statement enables PHP security checks to force register_global settings to be switched off."),
229                                 "check"         => "gosaProperty::isBool",
230                                 "migrate"       => "",
231                                 "group"         => "security",
232                                 "mandatory"     => TRUE),
234                         array(
235                                 "name"          => "forceSSL",
236                                 "type"          => "bool",
237                                 "default"       => "false",
238                                 "description"   => _("The 'forceSSL' statement enables PHP security checks to force encrypted access to the web interface. GOsa will try to redirect to the same URL - just with https://"),
239                                 "check"         => "gosaProperty::isBool",
240                                 "migrate"       => "",
241                                 "group"         => "security",
242                                 "mandatory"     => TRUE),
244                         array(
245                                 "name"          => "ldapStats",
246                                 "type"          => "bool",
247                                 "default"       => "false",
248                                 "description"   => _("Logs information about triggered ldap operations, duration, filter, aso. into syslog."),
249                                 "check"         => "gosaProperty::isBool",
250                                 "migrate"       => "",
251                                 "group"         => "debug",
252                                 "mandatory"     => FALSE),
254                         array(
255                                 "name"          => "ldapFollowReferrals",
256                                 "type"          => "bool",
257                                 "default"       => "false",
258                                 "description"   => _("The 'ldapFollowReferrals' statement tells GOsa to follow LDAP referrals."),
259                                 "check"         => "gosaProperty::isBool",
260                                 "migrate"       => "",
261                                 "group"         => "ldap",
262                                 "mandatory"     => TRUE),
264                         array(
265                                 "name"          => "ldapFilterNestingLimit",
266                                 "type"          => "integer",
267                                 "default"       => 200,
268                                 "description"   => _("The 'ldapFilterNestingLimit' statement can be used to speed up group handling for groups with several hundreds of members. The default behaviour is, that GOsa will resolv the memberUid values in a group to real names. To achieve this, it writes a single filter to minimize searches. Some LDAP servers (namely Sun DS) simply crash when the filter gets too big. You can set a member limit, where GOsa will stop to do these lookups."),
269                                 "check"         => "gosaProperty::isInteger",
270                                 "migrate"       => "",
271                                 "group"         => "ldap",
272                                 "mandatory"     => TRUE),
274                         array(
275                                 "name"          => "ldapSizelimit",
276                                 "type"          => "integer",
277                                 "default"       => 200,
278                                 "description"   => _("The ldapSizelimit statement tells GOsa to retrieve the specified maximum number of results. The user will get  a  warning,  that  not  all entries were shown."), 
279                                 "check"         => "gosaProperty::isInteger",
280                                 "migrate"       => "",
281                                 "group"         => "core",
282                                 "mandatory"     => TRUE),
284                         array(
285                                 "name"          => "ldapSizeIgnore",
286                                 "type"          => "bool",
287                                 "default"       => "false",
288                                 "description"   => _("Disables sizelimit checks, only the configured amount of results will be shown!"),
289                                 "check"         => "gosaProperty::isBool",
290                                 "migrate"       => "",
291                                 "group"         => "core",
292                                 "mandatory"     => FALSE),
294                         array(
295                                 "name"          => "warnSSL",
296                                 "type"          => "bool",
297                                 "default"       => "true",
298                                 "description"   => _("The 'warnSSL' statement enables PHP security checks to detect non encrypted access to the web interface. GOsa will display a warning in this case."),
299                                 "check"         => "gosaProperty::isBool",
300                                 "migrate"       => "",
301                                 "group"         => "security",
302                                 "mandatory"     => TRUE),
304                         array(
305                                 "name"          => "ppdGzip",
306                                 "type"          => "bool",
307                                 "default"       => "true",
308                                 "description"   => _("The 'ppdGzip' variable enables PPD file compression."),
309                                 "check"         => "gosaProperty::isBool",
310                                 "migrate"       => "",
311                                 "group"         => "ppd",
312                                 "mandatory"     => FALSE),
315                         array(
316                                 "name"          => "ignoreAcl",
317                                 "type"          => "dn",
318                                 "default"       => "",
319                                 "description"   => _("The 'ignoreAcl' value tells GOsa to ignore complete ACL sets for the given DN. Add your DN here and you'll be able to restore accidently dropped ACLs."),
320                                 "check"         => "gosaProperty::isDN",
321                                 "migrate"       => "",
322                                 "group"         => "debug",
323                                 "mandatory"     => FALSE),
326                         array(
327                                 "name"          => "ppdPath",
328                                 "type"          => "path",
329                                 "default"       => "/var/spool/ppd",
330                                 "description"   => _("The 'ppdPath' variable defines where to store PPD files for the GOto environment plugins."),
331                                 "check"         => "gosaProperty::isPath",
332                                 "migrate"       => "",
333                                 "group"         => "ppd",
334                                 "mandatory"     => FALSE),
336                         array(
337                                 "name"          => "ldapMaxQueryTime",
338                                 "type"          => "integer",
339                                 "default"       => "",
340                                 "description"   => _("The 'ldapMaxQueryTime' statement tells GOsa to stop LDAP actions if there is no answer within the specified number of seconds."),
341                                 "check"         => "gosaProperty::isInteger",
342                                 "migrate"       => "",
343                                 "group"         => "debug",
344                                 "mandatory"     => FALSE),
346                         array(
347                                 "name"          => "storeFilterSettings",
348                                 "type"          => "bool",
349                                 "default"       => "true",
350                                 "description"   => _("The 'storeFilterSettings' statement determines whether GOsa should store filter and plugin settings inside of a cookie."),
351                                 "check"         => "gosaProperty::isBool",
352                                 "migrate"       => "",
353                                 "group"         => "core",
354                                 "mandatory"     => FALSE),
356                         array(
357                                 "name"          => "sendCompressedOutput",
358                                 "type"          => "bool",
359                                 "default"       => "true",
360                                 "description"   => _("The 'sendCompressedOutput' statement determines whether PHP should send compressed HTML pages to browsers or not. This may increase or decrease the performance, depending on your network."),
361                                 "check"         => "gosaProperty::isBool",
362                                 "migrate"       => "",
363                                 "group"         => "core",
364                                 "mandatory"     => FALSE),
366                         array(
367                                 "name"          => "modificationDetectionAttribute",
368                                 "type"          => "switch",
369                                 "default"       => "entryCSN",
370                                 "defaults"      => "core::getPropertyValues",
371                                 "description"   => _("The 'modificationDetectionAttribute' statement enables GOsa to check if a entry currently being edited has been modified from someone else outside GOsa in the meantime. It will display an informative dialog then. It can be set to 'entryCSN' for OpenLDAP based systems or 'contextCSN' for Sun DS based systems."),
372                                 "check"         => "",
373                                 "migrate"       => "",
374                                 "group"         => "core",
375                                 "mandatory"     => TRUE),
377                         array(
378                                 "name"          => "language",
379                                 "type"          => "switch",
380                                 "default"       => "",
381                                 "defaults"      => "core::getPropertyValues",
382                                 "description"   => _("The 'language' statement defines the default language used by GOsa. Normally GOsa autodetects the language from the browser settings. If this is not working or you want to force the language, just add the language code (i.e. de for german) here."),
383                                 "check"         => "",
384                                 "migrate"       => "",
385                                 "group"         => "core",
386                                 "mandatory"     => FALSE),
388                         array(
389                                 "name"          => "theme",
390                                 "type"          => "switch",
391                                 "default"       => "default",
392                                 "defaults"      => "core::getPropertyValues",
393                                 "description"   => _("The 'theme' statement defines what theme is used to display GOsa pages. You can install some corporate identity like theme and/or modify certain templates to fit your needs within themes. Take a look at the GOsa FAQ for more information."),
394                                 "check"         => "",
395                                 "migrate"       => "",
396                                 "group"         => "visual",
397                                 "mandatory"     => TRUE),
399                         array(
400                                 "name"          => "sessionLifetime",
401                                 "type"          => "integer",
402                                 "default"       => 600,
403                                 "description"   => _("The 'sessionLifetime' value defines when a session will expire in seconds. For Debian systems, this will not work because the sessions will be removed by a cron job instead. Please modify the value inside of your php.ini instead."),
404                                 "check"         => "gosaProperty::isInteger",
405                                 "migrate"       => "",
406                                 "group"         => "security",
407                                 "mandatory"     => FALSE),
409                         array(
410                                 "name"          => "templateCompileDirectory",
411                                 "type"          => "path",
412                                 "default"       => "/var/spool/gosa",
413                                 "description"   => _("The 'templateCompileDirectory' statements defines the path, where the PHP templating engins 'smarty' should store its compiled GOsa templates for improved speed. This path needs to be writeable by the user your webserver is running with."),
414                                 "check"         => "gosaProperty::isWriteablePath",
415                                 "migrate"       => "",
416                                 "group"         => "core",
417                                 "mandatory"     => TRUE),
419                         array(
420                                 "name"          => "debugLevel",
421                                 "type"          => "integer",
422                                 "default"       => 0,
423                                 "description"   => sprintf(_("The 'debugLevel' value tells GOsa to display certain information on each page load. Value is an AND combination of the following byte values: %s"),
425 DEBUG_TRACE   = 1
426 DEBUG_LDAP    = 2
427 DEBUG_MYSQL   = 4
428 DEBUG_SHELL   = 8
429 DEBUG_POST    = 16
430 DEBUG_SESSION = 32
431 DEBUG_CONFIG  = 64
432 DEBUG_ACL     = 128
433 DEBUG_SI      = 256"),
434                                 "check"         => "gosaProperty::isInteger",
435                                 "migrate"       => "",
436                                 "group"         => "debug",
437                                 "mandatory"     => FALSE),
439                         array(
440                                 "name"          => "sambaHashHook",
441                                 "type"          => "command",
442                                 "default"       => "perl -MCrypt::SmbHash -e \"print join(q[:], ntlmgen \\\$ARGV[0]), $/;\"",
443                                 "description"   => sprintf(_("The 'sambaHashHook' statement contains an executable to generate samba hash values. This is required for password synchronization, but not required if you apply gosa-si services. If you don't have mkntpasswd from the samba distribution installed, you can use perl to generate the hash: %s"),"perl -MCrypt::SmbHash -e \"print join(q[:], ntlmgen \\\$ARGV[0]), $/;\""),
444                                 "check"         => "gosaProperty::isCommand",
445                                 "migrate"       => "",
446                                 "group"         => "samba",
447                                 "mandatory"     => FALSE),
449                         array(
450                                 "name"          => "passwordDefaultHash",
451                                 "type"          => "switch",
452                                 "default"       => "crypt/md5",
453                                 "defaults"      => "core::getPropertyValues",
454                                 "description"   => _("The 'passwordDefaultHash' statement defines the default password hash to choose for new accounts."),
455                                 "check"         => "",
456                                 "migrate"       => "",
457                                 "group"         => "password",
458                                 "mandatory"     => FALSE),
459                         array(
460                                 "name"          => "strictPasswordRules",
461                                 "type"          => "bool",
462                                 "default"       => "true",
463                                 "description"   => _("The 'strictPasswordRules' tells GOsa to check for UTF-8 characters in the supplied password. These Characters can lead to non working authentications if UTF-8 and none UTF-8 systems locales get mixed. The default is 'true'."),
464                                 "check"         => "gosaProperty::isBool",
465                                 "migrate"       => "",
466                                 "group"         => "password",
467                                 "mandatory"     => FALSE),
469                         array(
470                                 "name"          => "accountPrimaryAttribute",
471                                 "type"          => "switch",
472                                 "default"       => "cn",
473                                 "defaults"      => "core::getPropertyValues",
474                                 "description"   => _("The 'accountPrimaryAttribute' option tells GOsa how to create new accounts. Possible values are 'uid' and 'cn'. In the first case GOsa creates uid style DN entries: 'uid=superuser,ou=staff,dc=example,dc=net'. In the second case, GOsa creates cn style DN entries: 'cn=Foo Bar,ou=staff,dc=example,dc=net'. If you choose \"cn\" to be your 'accountPrimaryAttribute' you can decide whether to include the personal title in your dn by selecting 'personalTitleInDN'."),
475                                 "check"         => "",
476                                 "migrate"       => "",
477                                 "group"         => "security",
478                                 "mandatory"     => TRUE),
480                         array(
481                                 "name"          => "userRDN",
482                                 "type"          => "rdn",
483                                 "default"       => "ou=people,",
484                                 "description"   => _("The 'userRDN' statement defines the location where new accounts will be created inside of defined departments. The default is 'ou=people'."),
485                                 "check"         => "gosaProperty::isRdn",
486                                 "migrate"       => "migrate_userRDN", 
487                                 "group"         => "user",
488                                 "mandatory"     => FALSE),
490                         array(
491                                 "name"          => "groupRDN",
492                                 "type"          => "rdn",
493                                 "default"       => "ou=groups,",
494                                 "description"   => _("The 'groupsRDN' statement defines the location where new groups will be created inside of defined departments. The default is 'ou=groups'."),
495                                 "check"         => "gosaProperty::isRdn",
496                                 "migrate"       => "migrate_groupRDN",
497                                 "group"         => "group",
498                                 "mandatory"     => FALSE),
500                         array(
501                                 "name"          => "gidNumberBase",
502                                 "type"          => "integer",
503                                 "default"       => "1000",
504                                 "description"   => _("The 'gidNumberBase' statement defines where to start looking for a new free group id. This should be synced with your 'adduser.conf' to avoid overlapping gidNumber values between local and LDAP based lookups. The gidNumberBase can even be dynamic. Take a look at the 'nextIdHook' definition."),
505                                 "check"         => "gosaProperty::isInteger",
506                                 "migrate"       => "",
507                                 "group"         => "id",
508                                 "mandatory"     => TRUE),
510                        array(
511                                 "name"          => "baseIdHook",
512                                 "type"          => "command",
513                                 "default"       => "",
514                                 "description"   => _("The 'baseIdHook' statement allows to hook into the id generation method (traditional mode), to define the starting range for new generated ids"), 
515                                 "check"         => "gosaProperty::isCommand",
516                                 "migrate"       => "",
517                                 "group"         => "id",
518                                 "mandatory"     => FALSE),
520                         array(
521                                 "name"          => "gidNumberPoolMin",
522                                 "type"          => "integer",
523                                 "default"       => 10000,
524                                 "description"   => _("The 'uidNumberPoolMin/gidNumberPoolMin' statement defines the lowest assignable user/group id for use with the 'idAllocationMethod = pool'."),
525                                 "check"         => "gosaProperty::isInteger",
526                                 "migrate"       => "",
527                                 "group"         => "id",
528                                 "mandatory"     => FALSE),
530                         array(
531                                 "name"          => "gidNumberPoolMax",
532                                 "type"          => "integer",
533                                 "default"       => 40000,
534                                 "description"   => _("The 'uidNumberPoolMax/gidNumberPoolMax' statement defines the highest assignable user/group id for use with the 'idAllocationMethod = pool'."),
535                                 "check"         => "gosaProperty::isInteger",
536                                 "migrate"       => "",
537                                 "group"         => "id",
538                                 "mandatory"     => FALSE),
540                         array(
541                                 "name"          => "uidNumberPoolMin",
542                                 "type"          => "integer",
543                                 "default"       => 10000,
544                                 "description"   => _("The 'uidNumberPoolMin/gidNumberPoolMin' statement defines the lowest assignable user/group id for use with the 'idAllocationMethod = pool'."),
545                                 "check"         => "gosaProperty::isInteger",
546                                 "migrate"       => "",
547                                 "group"         => "id",
548                                 "mandatory"     => FALSE),
550                         array(
551                                 "name"          => "uidNumberPoolMax",
552                                 "type"          => "integer",
553                                 "default"       => 40000,
554                                 "description"   => _("The 'uidNumberPoolMax/gidNumberPoolMax' statement defines the highest assignable user/group id for use with the 'idAllocationMethod = pool'."),
555                                 "check"         => "gosaProperty::isInteger",
556                                 "migrate"       => "",
557                                 "group"         => "id",
558                                 "mandatory"     => FALSE),
560                         array(
561                                 "name"          => "uidNumberBase",
562                                 "type"          => "integer",
563                                 "default"       => "1000",
564                                 "description"   => _("The 'uidNumberBase' statement defines where to start looking for a new free user id. This should be synced with your 'adduser.conf' to avoid overlapping uidNumber values between local and LDAP based lookups. The uidNumberBase can even be dynamic. Take a look at the 'baseIdHook' definition."),
565                                 "check"         => "gosaProperty::isInteger",
566                                 "migrate"       => "",
567                                 "group"         => "id",
568                                 "mandatory"     => FALSE),
570                         array(
571                                 "name"          => "gosaRpcServer",
572                                 "type"          => "string",
573                                 "default"       => "",
574                                 "description"   => "The server to use for RPC connections! (http://localhost:8080/rpc), Future GOsa-ng service! If this value is set and not empty GOsa will try to establish a connection!",
575                                 "check"         => "",
576                                 "migrate"       => "",
577                                 "group"         => "rpc",
578                                 "mandatory"     => FALSE),
580                         array(
581                                 "name"          => "gosaRpcUser",
582                                 "type"          => "string",
583                                 "default"       => "admin",
584                                 "description"   => "Ther username to use for RPC connections! Future GOsa-ng service!",
585                                 "check"         => "",
586                                 "migrate"       => "",
587                                 "group"         => "rpc",
588                                 "mandatory"     => FALSE),
590                         array(
591                                 "name"          => "gosaRpcPassword",
592                                 "type"          => "string",
593                                 "default"       => "tester",
594                                 "description"   => "Ther password to use for RPC connections! Future GOsa-ng service!",
595                                 "check"         => "",
596                                 "migrate"       => "",
597                                 "group"         => "rpc",
598                                 "mandatory"     => FALSE),
600                         array(
601                                 "name"          => "gosaSupportURI",
602                                 "type"          => "string",
603                                 "default"       => "",
604                                 "description"   => _("The 'gosaSupportURI' defines the major gosa-si server host and the password for GOsa to connect to it. It can be used if you want to use i.e. kerberos to authenticate the users. The format is: credentials@host:port"),
605                                 "check"         => "",
606                                 "migrate"       => "",
607                                 "group"         => "gosa-si",
608                                 "mandatory"     => FALSE),
610                         array(
611                                 "name"          => "gosaSupportTimeout",
612                                 "type"          => "integer",
613                                 "default"       => 15,
614                                 "description"   => _("The 'gosaSupportTimeout' sets a connection timeout for all gosa-si actions. See 'gosaSupportURI' for details."),
615                                 "check"         => "gosaProperty::isInteger",
616                                 "migrate"       => "",
617                                 "group"         => "gosa-si",
618                                 "mandatory"     => FALSE),
620                         array(
621                                 "name"          => "loginAttribute",
622                                 "type"          => "switch",
623                                 "default"       => "uid",
624                                 "defaults"      => "core::getPropertyValues",
625                                 "description"   => _("The 'loginAttribute' statement tells GOsa which LDAP attribute is used as the login name during login. It can be set to 'uid', 'mail' or 'both'"),
626                                 "check"         => "",
627                                 "migrate"       => "",
628                                 "group"         => "security",
629                                 "mandatory"     => TRUE),
631                         array(
632                                 "name"          => "timezone",
633                                 "type"          => "switch",
634                                 "default"       => "",
635                                 "defaults"      => "core::getPropertyValues",
636                                 "description"   => _("The 'timezone' statements defines the timezone used inside of GOsa to handle date related tasks, such as password expiery, vacation messages, etc. The 'timezone' value should be a unix conform timezone value like in /etc/timezone."),
637                                 "check"         => "",
638                                 "migrate"       => "",
639                                 "group"         => "core",
640                                 "mandatory"     => FALSE),
642                         array(
643                                 "name"          => "honourUnitTags",
644                                 "type"          => "bool",
645                                 "default"       => "false",
646                                 "description"   => _("The 'honourUnitTags' statement enables checking of 'unitTag' attributes when using administrative units. If this is set to 'true' GOsa can only see objects inside the administrative unit a user is logged into."),
647                                 "check"         => "",
648                                 "migrate"       => "",
649                                 "group"         => "core",
650                                 "mandatory"     => FALSE),
652                         array(
653                                 "name"          => "useSaslForKerberos",
654                                 "type"          => "bool",
655                                 "default"       => "false",
656                                 "description"   => _("The 'useSaslForKerberos' statement defines the way the kerberos realm is stored in the #userPassword' attribute. Set it to 'true' in order to get {sasl}user@REALM.NET, or to 'false' to get {kerberos}user@REALM.NET. The latter is outdated, but may be needed from time to time."),
657                                 "check"         => "gosaProperty::isBool",
658                                 "migrate"       => "",
659                                 "group"         => "password",
660                                 "mandatory"     => FALSE),
662                         array(
663                                 "name"          => "rfc2307bis",
664                                 "type"          => "bool",
665                                 "default"       => "false",
666                                 "description"   => _("The 'rfc2307bis' statement enables rfc2307bis style groups in GOsa. You can use 'member' attributes instead of memberUid in this case. To make it work on unix systems, you've to adjust your NSS configuration to use rfc2307bis style groups, too"),
667                                 "check"         => "gosaProperty::isBool",
668                                 "migrate"       => "",
669                                 "group"         => "core",
670                                 "mandatory"     => FALSE),
672                         array(
673                                 "name"          => "personalTitleInDN",
674                                 "type"          => "bool",
675                                 "default"       => "false",
676                                 "description"   => _("The 'personalTitleInDN' option tells GOsa to include the personal title in user DNs when #accountPrimaryAttribute' is set to \"cn\"."),
677                                 "check"         => "gosaProperty::isBool",
678                                 "migrate"       => "",
679                                 "group"         => "storage location",
680                                 "mandatory"     => FALSE),
682                         array(
683                                 "name"          => "nextIdHook",
684                                 "type"          => "command",
685                                 "default"       => "",
686                                 "description"   => _("The 'nextIdHook' statement defines a script to be called for finding the next free id for users or groups externaly. It gets called with the current entry \"dn\" and the attribute to be ID'd. It should return an integer value."),
687                                 "check"         => "gosaProperty::isCommand",
688                                 "migrate"       => "",
689                                 "group"         => "id",
690                                 "mandatory"     => FALSE),
692                         array(
693                                 "name"          => "idGenerator",
694                                 "type"          => "string",
695                                 "default"       => "{%sn}-{%givenName[2-4]}",
696                                 "description"   => _("The 'idGenerator' statement describes an automatic way to generate new user ids. There are two basic functions supported - which can be combined: 
698  a) using attributes
700     You can specify LDAP attributes (currently only sn and givenName) in
701     braces {} and add a percent sign befor it. Optionally you can strip it
702     down to a number of characters, specified in []. I.e.
704       idGenerator=\"{%sn}-{%givenName[2-4]}\"
706     will generate an ID using the full surename, adding a dash, and adding at
707     least the first two characters of givenName. If this ID is used, it'll
708     use up to four characters. If no automatic generation is possible, a
709     input box is shown.
711  b) using automatic id's
713     I.e. specifying
715       idGenerator=\"acct{id:3}\"
717     will generate a three digits id with the next free entry appended to \"acct\".
719       idGenerator=\"acct{id!1}\"
721     will generate a one digit id with the next free entry appended to \"acct\" - if needed.
723       idGenerator=\"ext{id#3}\"
725     will generate a three digits random number appended to \"ext\".
726 "),
727                                 "check"         => "",
728                                 "migrate"       => "",
729                                 "group"         => "core",
730                                 "mandatory"     => FALSE),
732                         array(
733                                 "name"          => "strictNamingRules",
734                                 "type"          => "bool",
735                                 "default"       => "true",
736                                 "description"   => _("The 'strictNamingRules' statement enables strict checking of uids and group names. If you need   characters like . or - inside of your accounts, set this to 'false'."),
737                                 "check"         => "gosaProperty::isBool",
738                                 "migrate"       => "",
739                                 "group"         => "core",
740                                 "mandatory"     => FALSE),
742                         array(
743                                 "name"          => "minId",
744                                 "type"          => "integer",
745                                 "default"       => 40,
746                                 "description"   => _("The 'minId' statement defines the minimum assignable user or group id to avoid security leaks with uid 0 accounts. This is used for the 'traditional' method."),
747                                 "check"         => "gosaProperty::isInteger",
748                                 "migrate"       => "",
749                                 "group"         => "id",
750                                 "mandatory"     => FALSE),
752                         array(
753                                 "name"          => "mailAttribute",
754                                 "type"          => "switch",
755                                 "default"       => "mail",
756                                 "defaults"      => "core::getPropertyValues",
757                                 "description"   => _("The 'mailAttribute' statement determines which attribute GOsa will use to create accounts. Valid values are 'mail' and 'uid'."),
758                                 "check"         => "",
759                                 "migrate"       => "",
760                                 "group"         => "mail",
761                                 "mandatory"     => FALSE),
763                         array(
764                                 "name"          => "gosaSharedPrefix",
765                                 "type"          => "string",
766                                 "default"       => "",
767                                 "description"   => _("This attribute allows to override the prefix used to create shared folders."),
768                                 "check"         => "",
769                                 "migrate"       => "",
770                                 "group"         => "mail",
771                                 "mandatory"     => FALSE),
773                         array(
774                                 "name"          => "mailUserCreation",
775                                 "type"          => "string",
776                                 "default"       => "",
777                                 "description"   => _("This attribute allows to override the user account creation syntax, see the 'mailFolderCreation' description for more details.
779 Examples
780  mailUserCreation=\"%prefix%%uid%\"           => \"user.foobar\"
781  mailUserCreation=\"my-prefix.%uid%%domain%\"  => \"my-prefix.foobar@example.com\"
782 "),
783                                 "check"         => "",
784                                 "migrate"       => "",
785                                 "group"         => "mail",
786                                 "mandatory"     => FALSE),
788                         array(
789                                 "name"          => "mailFolderCreation",
790                                 "type"          => "string",
791                                 "default"       => "",
792                                 "description"   => _("Every mail method has its own way to create mail accounts like 'share/development' or 'shared.development@example.com' which is used to identify the accounts, set quotas or add acls.
794 To override the methods default account creation syntax, you can set the 'mailFolderCreation' option.
796 Examples
798  mailFolderCreation=\"%prefix%%cn%\"              => \"shared.development\"
799  mailFolderCreation=\"my-prefix.%cn%%domain%\"    => \"my-prefix.development@example.com\"
801  %prefix%    The methods default prefix. (Depends on cyrusUseSlashes=FALSE/TRUE)
802  %cn%        The groups/users cn.
803  %uid%       The users uid.
804  %mail%      The objects mail attribute.
805  %domain%    The domain part of the objects mail attribute.
806  %mailpart%  The user address part of the mail address.
807  %uattrib%   Depends on mailAttribute=\"uid/mail\".
808 "),
809                                 "check"         => "",
810                                 "migrate"       => "",
811                                 "group"         => "mail",
812                                 "mandatory"     => FALSE),
814                         array(
815                                 "name"          => "imapTimeout",
816                                 "type"          => "integer",
817                                 "default"       => 10,
818                                 "description"   => _("The 'imapTimeout' statement sets the connection timeout for imap actions."),
819                                 "check"         => "gosaProperty::isInteger",
820                                 "migrate"       => "",
821                                 "group"         => "mail",
822                                 "mandatory"     => FALSE),
824                         array(
825                                 "name"          => "mailMethod",
826                                 "type"          => "switch",
827                                 "default"       => "",
828                                 "defaults"      => "core::getPropertyValues",
829                                 "description"   => _("The 'mailMethod' statement tells GOsa which mail method the setup should use to communicate with a possible mail server. Leave this undefined if your mail method does not match the predefined ones."),
830                                 "check"         => "",
831                                 "migrate"       => "",
832                                 "group"         => "mail",
833                                 "mandatory"     => FALSE),
835                         array(
836                                 "name"          => "cyrusUseSlashes",
837                                 "type"          => "bool",
838                                 "default"       => "true",
839                                 "description"   => _("The 'cyrusUseSlashes' statement determines if GOsa should use \"foo/bar\" or \"foo.bar\" namespaces in IMAP. Unix style is with slashes."),
840                                 "check"         => "gosaProperty::isBool",
841                                 "migrate"       => "",
842                                 "group"         => "mail",
843                                 "mandatory"     => FALSE),
845                         array(
846                                 "name"          => "vacationTemplateDirectory",
847                                 "type"          => "path",
848                                 "default"       => "/etc/gosa/vacation",
849                                 "description"   => _("The 'vacationTemplateDirectory' statement sets the path where GOsa will look for vacation message templates. Default is /etc/gosa/vacation. 
851 Example template /etc/gosa/vacation/business.txt:
853    DESC:Away from desk
854    Hi, I'm currently away from my desk. You can contact me on
855    my cell phone via %mobile.
857    Greetings,
858    %givenName %sn
860 "),
861                                 "check"         => "gosaProperty::isWriteablePath",
862                                 "migrate"       => "",
863                                 "group"         => "mail",
864                                 "mandatory"     => FALSE),
866                         array(
867                                 "name"          => "ldapTLS",
868                                 "type"          => "bool",
869                                 "default"       => "false",
870                                 "description"   => _("The 'ldapTLS' statement enables or disables TLS operating on LDAP connections."),
871                                 "check"         => "gosaProperty::isBool",
872                                 "migrate"       => "",
873                                 "group"         => "security",
874                                 "mandatory"     => TRUE),
876                         array(
877                                 "name"          => "honourIvbbAttributes",
878                                 "type"          => "bool",
879                                 "default"       => "false",
880                                 "description"   => _("The 'honourIvbbAttributes' statement enables the IVBB mode inside of GOsa. You need the ivbb.schema file from used by german authorities."),
881                                 "check"         => "gosaProperty::isBool",
882                                 "migrate"       => "",
883                                 "group"         => "core",
884                                 "mandatory"     => FALSE),
886                         array(
887                                 "name"          => "sambaIdMapping",
888                                 "type"          => "bool",
889                                 "default"       => "false",
890                                 "description"   => _("The 'sambaIdMapping' statement tells GOsa to maintain sambaIdmapEntry objects. Depending on your setup this can drastically improve the windows login performance."),
891                                 "check"         => "gosaProperty::isBool",
892                                 "migrate"       => "",
893                                 "group"         => "samba",
894                                 "mandatory"     => FALSE),
896                         array(
897                                 "name"          => "handleExpiredAccounts",
898                                 "type"          => "bool",
899                                 "default"       => "true",
900                                 "description"   => _("The 'handleExpiredAccounts' statement enables shadow attribute tests during the login to the GOsa web interface and forces password renewal or account lockout."),
901                                 "check"         => "gosaProperty::isBool",
902                                 "migrate"       => "",
903                                 "group"         => "core",
904                                 "mandatory"     => FALSE),
906                         array(
907                                 "name"          => "sambaSID",
908                                 "type"          => "string",
909                                 "default"       => "",
910                                 "description"   => _("The 'sambaSID' statement defines a samba SID if not available inside of the LDAP. You can retrieve the current sid by net getlocalsid."),
911                                 "check"         => "",
912                                 "migrate"       => "",
913                                 "group"         => "samba",
914                                 "mandatory"     => FALSE),
916                         array(
917                                 "name"          => "sambaRidBase",
918                                 "type"          => "integer",
919                                 "default"       => "",
920                                 "description"   => _("The 'sambaRidBase' statement defines the base id to add to ordinary sid calculations - if not available inside of the LDAP."),
921                                 "check"         => "gosaProperty::isInteger",
922                                 "migrate"       => "",
923                                 "group"         => "samba",
924                                 "mandatory"     => FALSE),
926                         array(
927                                 "name"          => "enableSnapshots",
928                                 "type"          => "bool",
929                                 "default"       => "false",
930                                 "description"   => _("The 'enableSnapshots' statement enables a snapshot mechaism in GOsa. This enables you to save certain states of entries and restore them later on."),
931                                 "check"         => "gosaProperty::isBool",
932                                 "migrate"       => "",
933                                 "group"         => "snapshot",
934                                 "mandatory"     => TRUE),
936                         array(
937                                 "name"          => "snapshotBase",
938                                 "type"          => "dn",
939                                 "default"       => "ou=snapshots,dc=localhost,dc=de",
940                                 "description"   => _("The 'snapshotBase' statement defines the base where snapshots should be stored inside of the LDAP."),
941                                 "check"         => "gosaProperty::isDn",
942                                 "migrate"       => "",
943                                 "group"         => "snapshot",
944                                 "mandatory"     => FALSE),
946                         array(
947                                 "name"          => "snapshotAdminDn",
948                                 "type"          => "dn",
949                                 "default"       => "cn=admin,dc=localhost,dc=de",
950                                 "description"   => _("The 'snapshotAdminDn' variable defines the user which is used to authenticate when connecting to 'snapshotURI'."),
951                                 "check"         => "gosaProperty::isDn",
952                                 "migrate"       => "",
953                                 "group"         => "snapshot",
954                                 "mandatory"     => FALSE),
956                         array(
957                                 "name"          => "snapshotAdminPassword",
958                                 "type"          => "string",
959                                 "default"       => "secret",
960                                 "description"   => _("The 'snapshotAdminPassword' variable defines the credentials which are used in combination with 'snapshotAdminDn' and 'snapshotURI' in order to authenticate."),
961                                 "check"         => "",
962                                 "migrate"       => "",
963                                 "group"         => "snapshot",
964                                 "mandatory"     => FALSE),
966                         array(
967                                 "name"          => "idAllocationMethod",
968                                 "type"          => "switch",
969                                 "default"       => "traditional",
970                                 "defaults"      => "core::getPropertyValues",
971                                 "description"   => _("The 'idAllocationMethod' statement defines how GOsa generates numeric user and group id values. If it is set to 'traditional' GOsa will do create a lock and perform a search for the next free ID. The lock will be removed after the procedure completes. 'pool' will use the sambaUnixIdPool objectclass settings inside your LDAP. This one is unsafe, because it does not check for concurrent LDAP access and already used IDs in this range. On the other hand it is much faster."),
972                                 "check"         => "",
973                                 "migrate"       => "",
974                                 "group"         => "id",
975                                 "mandatory"     => TRUE),
976                         array(
977                                 "name"          => "snapshotURI",
978                                 "type"          => "uri",
979                                 "default"       => "ldap://localhost:389",
980                                 "description"   => _("The 'snapshotURI' variable defines the LDAP URI for the server which is used to do object snapshots."),
981                                 "check"         => "",
982                                 "migrate"       => "",
983                                 "group"         => "snapshot",
984                                 "mandatory"     => FALSE)
985                             )));
986     }
988 ?>