1 <?php
3 class termgeneric extends plugin
4 {
5 /* Generic terminal attributes */
6 var $gotoMode= "locked";
7 var $gotoTerminalPath= "";
8 var $gotoSwapServer= "";
9 var $gotoSyslogServer= "";
10 var $gotoSyslogServers = array();
11 var $gotoNtpServer= array();
12 var $gotoNtpServers= array();
13 var $gotoSndModule= "";
14 var $gotoFloppyEnable= "";
15 var $gotoCdromEnable= "";
16 var $ghCpuType= "-";
17 var $ghMemSize= "-";
18 var $ghUsbSupport= "-";
19 var $ghNetNic= array();
20 var $ghIdeDev= array();
21 var $ghScsiDev= array();
22 var $ghGfxAdapter= "-";
23 var $ghSoundAdapter= "-";
24 var $gotoLastUser= "-";
25 var $netConfigDNS;
26 var $auto_activate= FALSE;
28 /* Needed values and lists */
29 var $base= "";
30 var $cn= "";
31 var $description= "";
32 var $orig_dn= "";
33 var $orig_cn= "";
34 var $orig_base= "";
36 var $inheritTimeServer = true;
38 /* Plugin side filled */
39 var $modes= array();
41 /* attribute list for save action */
42 var $ignore_account= TRUE;
43 var $attributes= array("gotoMode", "gotoTerminalPath",
44 "gotoSwapServer", "gotoSyslogServer", "gotoNtpServer",
45 "gotoFloppyEnable", "gotoCdromEnable", "cn", "gotoSndModule",
46 "ghCpuType", "ghMemSize","ghUsbSupport", "description",
47 "ghGfxAdapter", "ghSoundAdapter", "gotoLastUser");
48 var $objectclasses= array("top", "gotoTerminal", "GOhard");
50 var $validActions = array("reboot" => "", "rescan" => "", "wake" => "", "memcheck" => "", "sysinfo" => "");
52 var $fai_activated = FALSE;
53 var $view_logged = FALSE;
55 var $member_of_ogroup = FALSE;
57 var $kerberos_key_service = NULL;
60 function termgeneric (&$config, $dn= NULL, $parent= NULL)
61 {
62 /* Check if FAI is activated */
63 $tmp= $config->search("faiManagement", "CLASS",array('menu','tabs'));
64 if(!empty($tmp)){
65 $this->fai_activated = TRUE;
66 }
68 plugin::plugin ($config, $dn, $parent);
70 if(class_available("krbHostKeys")){
71 $this->kerberos_key_service = new krbHostKeys($this->config,$this);
72 }
74 if(!isset($this->parent->by_object['ogroup'])){
75 $ldap = $this->config->get_ldap_link();
76 $ldap->cd ($this->config->current['BASE']);
77 $ldap->search("(&(|(objectClass=gotoTerminalTemplate)(objectClass=gotoWorkstationTemplate))(member=".LDAP::prepare4filter($this->dn)."))",array("cn"));
78 $this->member_of_ogroup = $ldap->count() >= 1;
79 }
81 $this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses);
82 /* Read arrays */
83 foreach (array("ghNetNic", "ghIdeDev", "ghScsiDev") as $val){
84 if (!isset($this->attrs[$val])){
85 continue;
86 }
87 for ($i= 0; $i<$this->attrs[$val]['count']; $i++){
88 array_push($this->$val, $this->attrs[$val][$i]);
89 }
90 }
92 /* Create used ntp server array */
93 $this->gotoNtpServer= array();
94 if(isset($this->attrs['gotoNtpServer'])){
95 $this->inheritTimeServer = false;
96 for($i = 0 ; $i < $this->attrs['gotoNtpServer']['count']; $i++ ){
97 $server = $this->attrs['gotoNtpServer'][$i];
98 $this->gotoNtpServer[$server] = $server;
99 }
100 }
102 /* Set inherit checkbox state */
103 if((in_array("default",$this->gotoNtpServer)) || (count($this->gotoNtpServer)==0)){
104 $this->inheritTimeServer = true;
105 $this->gotoNtpServer=array();
106 }
108 /* You can't inherit the NTP service, if we are not member in an object group */
109 if(!$this->member_of_ogroup){
110 $this->inheritTimeServer = FALSE;
111 }
113 /* Create available ntp options */
114 $this->gotoNtpServers = $this->config->data['SERVERS']['NTP'];
115 foreach($this->gotoNtpServers as $key => $server){
116 if($server == "default"){
117 unset($this->gotoNtpServers[$key]);
118 }
119 }
121 $this->modes["locked"]= _("Locked");
122 $this->modes["active"]= _("Activated");
124 /* Set base */
125 if ($this->dn == "new"){
126 $ui= get_userinfo();
127 $this->base= dn2base($ui->dn);
128 } else {
129 $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("terminalRDN"), '/')."/", "", $this->dn);
130 }
132 /* Create an array of all Syslog servers */
133 $tmp = $this->config->data['SERVERS']['SYSLOG'];
134 foreach($tmp as $server){
135 $visible = $server;
136 if($server == "default" && $this->member_of_ogroup) {
137 $visible = "["._("inherited")."]";
138 }
139 $this->gotoSyslogServers[$server] = $visible;
140 }
142 $this->orig_dn= $this->dn;
143 $this->orig_cn= $this->cn;
144 $this->orig_base= $this->base;
145 }
147 function set_acl_base($base)
148 {
149 plugin::set_acl_base($base);
150 $this->netConfigDNS->set_acl_base($base);
151 }
153 function set_acl_category($cat)
154 {
155 plugin::set_acl_category($cat);
156 $this->netConfigDNS->set_acl_category($cat);
157 }
159 function execute()
160 {
161 /* Call parent execute */
162 plugin::execute();
164 if($this->is_account && !$this->view_logged){
165 $this->view_logged = TRUE;
166 new log("view","terminal/".get_class($this),$this->dn);
167 }
169 /* Do we need to flip is_account state? */
170 if (isset($_POST['modify_state'])){
171 $this->is_account= !$this->is_account;
172 }
174 if (isset($_POST['action']) && $this->acl_is_writeable("FAIstate") && isset($this->validActions[$_POST['saction']])){
175 $action = $_POST['saction'];
177 /* Check if we have an DaemonEvent for this action */
178 if(class_available("DaemonEvent_".$action)){
179 $events = DaemonEvent::get_event_types(SYSTEM_EVENT | HIDDEN_EVENT);
180 if(isset($events['TRIGGERED']["DaemonEvent_".$action])){
181 $evt = $events['TRIGGERED']["DaemonEvent_".$action];
182 $tmp = new $evt['CLASS_NAME']($this->config);
183 $tmp->add_targets(array($this->netConfigDNS->macAddress));
184 $tmp->set_type(TRIGGERED_EVENT);
185 $o_queue = new gosaSupportDaemon();
186 if(!$o_queue->append($tmp)){
187 msg_dialog::display(_("Service infrastructure"),msgPool::siError($o_queue->get_error()),ERROR_DIALOG);
188 }
189 }
190 }else{
191 msg_dialog::display(_("Event error"),
192 sprintf(_("Event '%s' is not available!"),$action),ERROR_DIALOG);
193 }
195 }
197 /* Base select dialog */
198 $once = true;
199 foreach($_POST as $name => $value){
200 if(preg_match("/^chooseBase/",$name) && $once && $this->acl_is_moveable()){
201 $once = false;
202 $this->dialog = new baseSelectDialog($this->config,$this,$this->get_allowed_bases());
203 $this->dialog->setCurrentBase($this->base);
204 }
205 }
207 /* Dialog handling */
208 if(is_object($this->dialog)){
209 /* Must be called before save_object */
210 $this->dialog->save_object();
212 if($this->dialog->isClosed()){
213 $this->dialog = false;
214 }elseif($this->dialog->isSelected()){
216 /* A new base was selected, check if it is a valid one */
217 $tmp = $this->get_allowed_bases();
218 if(isset($tmp[$this->dialog->isSelected()])){
219 $this->base = $this->dialog->isSelected();
220 }
221 $this->dialog= false;
222 }else{
223 return($this->dialog->execute());
224 }
225 }
227 /* Do we represent a valid terminal? */
228 if (!$this->is_account && $this->parent === NULL){
229 $display= "<img alt=\"\" src=\"images/small-error.png\" align=middle> <b>".
230 msgPool::noValidExtension(_("terminal"))."</b>";
231 return($display);
232 }
234 /* Add new ntp Server to our list */
235 if((isset($_POST['addNtpServer'])) && (isset($_POST['gotoNtpServers'])) && $this->acl_is_writeable("gotoNtpServer")){
236 $this->gotoNtpServer[$_POST['gotoNtpServers']] = $_POST['gotoNtpServers'];
237 }
239 /* Delete selected NtpServer for list of used servers */
240 if((isset($_POST['delNtpServer'])) && (isset($_POST['gotoNtpServerSelected'])) && $this->acl_is_writeable("gotoNtpServer")){
241 foreach($_POST['gotoNtpServerSelected'] as $name){
242 unset($this->gotoNtpServer[$name]);
243 }
244 }
246 /* Fill templating stuff */
247 $smarty= get_smarty();
249 $tmp = $this->plInfo();
250 foreach($tmp['plProvidedAcls'] as $name => $translation){
251 $smarty->assign($name."ACL",$this->getacl($name));
252 }
254 $smarty->assign("cn", $this->cn);
255 $smarty->assign("description", $this->description);
256 $smarty->assign("staticAddress", "");
258 $smarty->assign("bases", $this->get_allowed_bases());
260 /* tell smarty the inherit checkbox state */
261 $smarty->assign("inheritTimeServer",$this->inheritTimeServer);
263 /* Check if terminal is online */
264 if (gosaSupportDaemon::ping($this->netConfigDNS->macAddress)){
265 $smarty->assign("actions", array( "halt" => _("Switch off"),
266 "reboot" => _("Reboot"),
267 #"memcheck" => _("Memory test"),
268 #"sysinfo" => _("System analysis")
269 ));
270 } else {
271 $smarty->assign("actions", array("wake" => _("Wake up"),
272 #"memcheck" => _("Memory test"),
273 #"sysinfo" => _("System analysis")
274 ));
275 }
277 /* Arrays */
278 $smarty->assign("modes", $this->modes);
280 $tmp2 = array();
281 $tmp2['!']= _("Local swap");
282 foreach($this->config->data['SERVERS']['NBD'] as $server){
283 if($server != "default"){
284 $tmp2[$server]= $server;
285 }else{
286 if($this->member_of_ogroup){
287 $tmp2[$server]="["._("inherited")."]";
288 }
289 }
290 }
292 $smarty->assign("swapservers", $tmp2);
293 $tmp2 = array();
294 foreach($this->config->data['SERVERS']['NFS'] as $server){
295 if($server != "default"){
296 $tmp2[$server]= $server;
297 }else{
298 if($this->member_of_ogroup){
299 $tmp2[$server]="["._("inherited")."]";
300 }
301 }
302 }
304 $smarty->assign("nfsservers", $tmp2);
305 $smarty->assign("syslogservers", $this->gotoSyslogServers);
307 $tmp = array();
308 foreach($this->gotoNtpServers as $server){
309 if(!in_array($server,$this->gotoNtpServer)){
310 $tmp[$server] = $server;
311 }
312 }
314 $smarty->assign("ntpservers", $tmp);
315 $smarty->assign("fai_activated",$this->fai_activated);
317 /* Variables */
318 foreach(array("base", "gotoMode", "gotoTerminalPath", "gotoSwapServer","gotoSyslogServer", "gotoNtpServer") as $val){
319 $smarty->assign($val."_select", $this->$val);
320 }
322 $smarty->assign("member_of_ogroup",$this->member_of_ogroup);
324 /* Show main page */
325 $str = $this->netConfigDNS->execute();
326 if(is_object($this->netConfigDNS->dialog)){
327 return($str);
328 }
329 $smarty->assign("netconfig", $str);
331 /* Display kerberos host key options */
332 $smarty->assign("host_key","");
333 if(is_object($this->kerberos_key_service)){
334 $smarty->assign("host_key",$this->kerberos_key_service->execute_by_prefix("host/"));
335 }
337 return($smarty->fetch (get_template_path('terminal.tpl', TRUE, dirname(__FILE__))));
338 }
340 function remove_from_parent()
341 {
342 if($this->acl_is_removeable()){
343 $ldap= $this->config->get_ldap_link();
344 $ldap->cd($this->dn);
345 $ldap->cat($this->dn, array('dn'));
346 if($ldap->count()){
347 $this->netConfigDNS->remove_from_parent();
348 $ldap->rmDir($this->dn);
350 new log("remove","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
352 if (!$ldap->success()){
353 msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
354 }
356 /* Remove kerberos key dependencies too */
357 if(is_object($this->kerberos_key_service)){
358 $this->kerberos_key_service->remove_from_parent_by_prefix("host/");
359 }
361 /* Optionally execute a command after we're done */
362 $this->handle_post_events("remove",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
364 /* Delete references to object groups */
365 $ldap->cd ($this->config->current['BASE']);
366 $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn"));
367 while ($ldap->fetch()){
368 $og= new ogroup($this->config, $ldap->getDN());
369 unset($og->member[$this->dn]);
370 $og->save ();
371 }
373 /* Remove all accessTo/trust dependencies */
374 update_accessTo($this->cn,"");
375 }
377 /* Clean queue form entries with this mac
378 */
379 if(class_available("gosaSupportDaemon") && tests::is_mac($this->netConfigDNS->orig_macAddress)){
380 $q = new gosaSupportDaemon();
381 $q->clean_queue_from_mac($this->netConfigDNS->orig_macAddress);
382 }
383 }
384 }
387 /* Save data to object */
388 function save_object()
389 {
390 /* Create a base backup and reset the
391 base directly after calling plugin::save_object();
392 Base will be set seperatly a few lines below */
393 $base_tmp = $this->base;
394 plugin::save_object();
395 $this->base = $base_tmp;
397 /* Set new base if allowed */
398 $tmp = $this->get_allowed_bases();
399 if(isset($_POST['base'])){
400 if(isset($tmp[$_POST['base']])){
401 $this->base= $_POST['base'];
402 }
403 }
405 $this->netConfigDNS->save_object();
407 /* Save terminal path to parent since it is used by termstartup, too */
408 if(isset($this->parent->by_object['termstartup'])){
409 $this->parent->by_object['termstartup']->gotoTerminalPath= $this->gotoTerminalPath;
410 }
412 if(isset($_POST['termgeneric_posted'])){
413 if(isset($_POST["inheritTimeServer"]) && $this->member_of_ogroup){
414 $this->inheritTimeServer = true;
415 }else{
416 $this->inheritTimeServer = false;
417 }
418 }
420 if(isset($_POST["inheritAll"])){
421 $this->set_everything_to_inherited();
422 }
424 /* Hanle kerberos host key plugin */
425 if(is_object($this->kerberos_key_service)){
426 $this->kerberos_key_service->save_object_by_prefix("host/");
427 }
428 }
431 /* Check supplied data */
432 function check()
433 {
434 /* Call common method to give check the hook */
435 $message= plugin::check();
437 /* Skip IP & Mac checks if this is a template */
438 if($this->cn != "default"){
439 $message= array_merge($message, $this->netConfigDNS->check());
440 }
442 /* Permissions for that base? */
443 $this->dn= "cn=".$this->cn.",".get_ou('terminalRDN').$this->base;
445 if ($this->cn == ""){
446 $message[]= msgPool::required(_("Name"));
447 }
449 /* Check if given name is a valid host/dns name */
450 if(!tests::is_dns_name($this->cn) ){
451 $message[] = msgPool::invalid(_("Name"));
452 }
454 if ($this->orig_dn == 'new'){
455 $ldap= $this->config->get_ldap_link();
456 $ldap->cd ($this->base);
458 /* It is possible to have a 'default' terminal on every base */
459 if($this->cn == "default"){
460 $ldap->cat($this->dn);
461 }else{
462 $ldap->search ("(&(objectClass=gotoTerminal)(cn=".$this->cn."))", array("cn"));
463 }
464 if ($ldap->count() != 0){
465 while ($attrs= $ldap->fetch()){
466 if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".preg_quote(get_ou('systemIncomingRDN'), '/')."/", $ldap->getDN())){
467 continue;
468 } else {
469 if ($attrs['dn'] != $this->orig_dn){
470 $message[]= msgPool::duplicated(_("Name"));
471 break;
472 }
473 }
474 }
475 }
476 }
478 /* Check for valid ntpServer selection */
479 if((!$this->inheritTimeServer) && (!count($this->gotoNtpServer))){
480 $message[]= msgPool::required(_("NTP server"));
481 }
483 /* Check if we are allowed to create or move this object
484 */
485 if($this->orig_dn == "new" && !$this->acl_is_createable($this->base)){
486 $message[] = msgPool::permCreate();
487 }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
488 $message[] = msgPool::permMove();
489 }
491 return ($message);
492 }
495 /* Save to LDAP */
496 function save()
497 {
498 /* Detect mode changes */
499 $activate= (isset($this->saved_attributes['gotoMode']) &&
500 $this->gotoMode != $this->saved_attributes['gotoMode'] &&
501 $this->gotoMode == "active" &&
502 tests::is_ip($this->netConfigDNS->ipHostNumber)) || $this->auto_activate;
503 plugin::save();
505 /* Strip out 'default' values */
506 foreach (array("gotoTerminalPath", "gotoSwapServer", "gotoSyslogServer") as $val){
507 if(isset($this->attrs[$val])){
508 if ($this->attrs[$val] == "default"){
509 $this->attrs[$val]= array();
510 }
511 }
512 }
514 /* Add missing arrays */
515 foreach (array("ghScsiDev", "ghIdeDev", "ghNetNic") as $val){
516 if (isset ($this->$val) && count ($this->$val) != 0){
517 $this->attrs["$val"]= $this->$val;
518 }
519 }
521 /* Remove all empty values */
522 if ($this->orig_dn == 'new'){
523 $attrs= array();
524 foreach ($this->attrs as $key => $val){
525 if (is_array($val) && count($val) == 0){
526 continue;
527 }
528 $attrs[$key]= $val;
529 }
530 $this->attrs= $attrs;
531 }
533 /* Set ntpServers */
534 $this->attrs['gotoNtpServer'] = array();
535 if(!$this->inheritTimeServer){
536 foreach($this->gotoNtpServer as $server){
537 $this->attrs['gotoNtpServer'][] = $server;
538 }
539 }
541 /* cn=default and macAddress=- indicates that this is a template */
542 if($this->cn == "default"){
543 $this->netConfigDNS->macAddress = "-";
544 }
546 /* Write back to ldap */
547 $ldap= $this->config->get_ldap_link();
548 if ($this->orig_dn == 'new'){
549 $ldap->cd($this->config->current['BASE']);
550 $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
551 $ldap->cd($this->dn);
552 if (!count($this->attrs['gotoNtpServer'])){
553 unset($this->attrs['gotoNtpServer']);
554 }
555 $ldap->add($this->attrs);
556 new log("create","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
558 $this->netConfigDNS->cn = $this->cn;
559 $this->netConfigDNS->save();
561 $this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
562 } else {
563 $ldap->cd($this->dn);
564 $this->cleanup();
565 $ldap->modify ($this->attrs);
566 new log("modify","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
568 $this->netConfigDNS->cn = $this->cn;
569 $this->netConfigDNS->save();
571 $this->handle_post_events("modify",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
573 /* Update all accessTo/trust dependencies */
574 if($this->orig_cn != $this->cn){
575 update_accessTo($this->orig_cn,$this->cn);
576 }
577 }
579 if (!$ldap->success()){
580 msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
581 }
583 /* Send installation activation
584 */
585 if ($activate && class_available("DaemonEvent")){
586 $events = DaemonEvent::get_event_types(SYSTEM_EVENT | HIDDEN_EVENT);
587 $o_queue = new gosaSupportDaemon();
588 if(isset($events['TRIGGERED']['DaemonEvent_installation_activation'])){
589 $evt = $events['TRIGGERED']['DaemonEvent_installation_activation'];
590 $tmp = new $evt['CLASS_NAME']($this->config);
591 $tmp->set_type(TRIGGERED_EVENT);
592 $tmp->add_targets(array($this->netConfigDNS->macAddress));
593 if(!$o_queue->append($tmp)){
594 msg_dialog::display(_("Service infrastructure"),msgPool::siError($o_queue->get_error()),ERROR_DIALOG);
595 }
596 }
597 }
598 }
601 /* Display generic part for server copy & paste */
602 function getCopyDialog()
603 {
604 $vars = array("cn");
605 $smarty = get_smarty();
606 $smarty->assign("cn" ,$this->cn);
607 $smarty->assign("object","terminal");
608 $str = $smarty->fetch(get_template_path("paste_generic.tpl",TRUE));
609 $ret = array();
610 $ret['string'] = $str;
611 $ret['status'] = "";
612 return($ret);
613 }
616 function saveCopyDialog()
617 {
618 if(isset($_POST['cn'])){
619 $this->cn = $_POST['cn'];
620 }
621 }
624 function PrepareForCopyPaste($source)
625 {
626 plugin::PrepareForCopyPaste($source);
627 if(isset($source['macAddress'][0])){
628 $this->netConfigDNS->macAddress = $source['macAddress'][0];
629 }
630 if(isset($source['ipHostNumber'][0])){
631 $this->netConfigDNS->ipHostNumber = $source['ipHostNumber'][0];
632 }
634 /* Create used ntp server array */
635 $this->gotoNtpServer= array();
636 if(isset($source['gotoNtpServer'])){
637 $this->inheritTimeServer = false;
638 unset($source['gotoNtpServer']['count']);
639 foreach($source['gotoNtpServer'] as $server){
640 $this->gotoNtpServer[$server] = $server;
641 }
642 }
644 /* Set inherit checkbox state */
645 if((in_array("default",$this->gotoNtpServer)) || (count($this->gotoNtpServer)==0)){
646 $this->inheritTimeServer = true;
647 $this->gotoNtpServer=array();
648 }
649 }
652 /* Return plugin informations for acl handling */
653 static function plInfo()
654 {
655 return (array(
656 "plShortName" => _("Terminal"),
657 "plDescription" => _("Terminal generic"),
658 "plSelfModify" => FALSE,
659 "plDepends" => array(),
660 "plPriority" => 1,
661 "plSection" => array("administration"),
662 "plCategory" => array("terminal" => array( "description" => _("Terminal"),
663 "objectClass" => "gotoTerminal")),
664 "plProvidedAcls"=> array(
665 "cn" => _("Name"),
666 "description" => _("Description"),
667 "base" => _("Base"),
669 "gotoMode" => _("Mode"),
670 "gotoSyslogServer" => _("Syslog server enabled"),
672 "gotoTerminalPath" => _("Root server"),
673 "gotoSwapServer" => _("Swap server"),
675 "gotoNtpServer" => _("Ntp server settings"),
676 "userPassword" => _("Root password"),
678 "FAIstate" => _("Action flag"))
679 ));
680 }
683 function set_everything_to_inherited()
684 {
685 $this->gotoTerminalPath = "default";
686 $this->gotoSwapServer = "default" ;
687 $this->gotoSyslogServer = "default";
688 $this->inheritTimeServer = TRUE;
690 /* Set workstation service attributes to inherited */
691 if($this->member_of_ogroup && isset($this->parent->by_object['termservice'])){
692 foreach(array("gotoXKbLayout","gotoXKbModel","gotoXKbVariant",
693 "gotoXResolution","gotoXColordepth","gotoXMouseType","gotoXMouseport") as $name){
694 $this->parent->by_object['termservice']->$name = "default";
695 }
696 }
698 /* Set workstation startup attributes to inherited */
699 if($this->member_of_ogroup && isset($this->parent->by_object['termstartup'])){
700 $this->parent->by_object['termstartup']->gotoBootKernel = "default-inherited";
701 $this->parent->by_object['termstartup']->gotoLdapServer = "default-inherited";
703 $this->parent->by_object['workstartup']->gotoLdap_inherit = TRUE;
704 $this->parent->by_object['workstartup']->gotoLdapServers = array();
705 }
706 }
707 }
709 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
710 ?>