From 0442fdc68e36443a634e66f82531591e5c8ae202 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 6 May 2008 07:25:10 +0000 Subject: [PATCH] Updated principal stuff git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10778 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../kerberos/class_password-methods-MIT.inc | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/gosa-plugins/heimdal/admin/systems/services/kerberos/class_password-methods-MIT.inc b/gosa-plugins/heimdal/admin/systems/services/kerberos/class_password-methods-MIT.inc index 3cdad0318..54ef642e9 100644 --- a/gosa-plugins/heimdal/admin/systems/services/kerberos/class_password-methods-MIT.inc +++ b/gosa-plugins/heimdal/admin/systems/services/kerberos/class_password-methods-MIT.inc @@ -170,7 +170,7 @@ class passwordMethodMIT extends passwordMethod /* Try to detect server our principal is configured on */ - if($this->map['PRINCIPAL_SERVER'][$p_name]){ + if(isset($this->map['PRINCIPAL_SERVER'][$p_name])){ $server= $this->map['PRINCIPAL_SERVER'][$p_name]; $this->goKrbRealm = $this->map['SERVER_REALM'][$server]; $this->principal = $p_name; @@ -198,6 +198,9 @@ class passwordMethodMIT extends passwordMethod $o = new gosaSupportDaemon(); $tmp = array(); $tmp = $o->krb5_get_principal($server,$name); + + print_a($tmp); + if($o->is_error()){ $this->si_error = TRUE; @@ -207,19 +210,19 @@ class passwordMethodMIT extends passwordMethod /* Load flags */ - if(isset($tmp['ATTRIBUTES'])){ - foreach($this->flags as $flag){ - if(in_array($flag,$tmp['ATTRIBUTES'])){ - $this->$flag = TRUE; - } - } - } +# if(isset($tmp['ATTRIBUTES'])){ +# foreach($this->flags as $flag){ +# if(in_array($flag,$tmp['ATTRIBUTES'])){ +# $this->$flag = TRUE; +# } +# } +# } /* Load readonly attributes */ foreach($this->readonly as $attr){ if(isset($tmp[$attr])){ - $this->$flag = $tmp[$attr]; + $this->$attr = $tmp[$attr]; } } @@ -227,7 +230,7 @@ class passwordMethodMIT extends passwordMethod */ foreach($this->values as $attr){ if(isset($tmp[$attr])){ - $this->$flag = $tmp[$attr]; + $this->$attr = $tmp[$attr]; } } } @@ -552,7 +555,7 @@ class passwordMethodMIT extends passwordMethod } } if(count($flags)){ - $entry['ATTRIBUTES'] = $flags; + $entry['ATTRIBUTES'] = "23"; } /* Append other values */ @@ -566,6 +569,12 @@ class passwordMethodMIT extends passwordMethod $entry['POLICY'] = $policy; } + foreach(array("PRINC_EXPIRE_TIME","PW_EXPIRATION") as $times){ + if(!empty($entry[$times])) { + $entry[$times] = strtotime($entry[$times]); + } + } + /* Save principal changes */ $o = new gosaSupportDaemon(); if(in_array($principal,$this->server_list[$server_name]['principals'])){ -- 2.30.2