From b4241488e52da0cedde83246031c6aaecf8809b4 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 5 Dec 2007 14:56:32 +0000 Subject: [PATCH] Added default values for heimdal git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8021 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_password-methods-heimdal.inc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/include/class_password-methods-heimdal.inc b/include/class_password-methods-heimdal.inc index d6c6f5055..7508feb79 100644 --- a/include/class_password-methods-heimdal.inc +++ b/include/class_password-methods-heimdal.inc @@ -59,12 +59,15 @@ class passwordMethodheimdal extends passwordMethod $this->config= $config; $this->parent_dn = $dn; + $this->is_account = FALSE; + $this->krb5MaxLife = 86400; + $this->krb5MaxRenew = 604800; + $this->krb5ValidStart = date("YmdHi",time()."Z"); + $this->krb5ValidEnd = date("YmdHi",time()."Z"); + $this->krb5PasswordEnd= date("YmdHi",time()."Z"); + /* Load existing entries */ - $this->krb5MaxLife = "86400"; - $this->krb5MaxRenew = "604800"; - if($dn == "new"){ - $this->is_account = FALSE; - }else{ + if($dn != "new"){ $ldap = $this->config->get_ldap_link(); $ldap->cd($dn); $ldap->ls("objectClass=krb5Principal",$dn,array("*")); @@ -75,6 +78,8 @@ class passwordMethodheimdal extends passwordMethod foreach($this->attributes as $attr){ if(isset($this->attrs[$attr][0])){ $this->$attr = $this->attrs[$attr][0]; + }else{ + $this->$attr = ""; } } }elseif($ldap->count() >= 2){ -- 2.30.2