From 91a019731f6012da1eabc8263aeec442e6dcc03b Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 23 Apr 2008 13:44:49 +0000 Subject: [PATCH] Updated gosaSupportDaemon -krb_get_policy function git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10656 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_gosaSupportDaemon.inc | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/gosa-core/include/class_gosaSupportDaemon.inc b/gosa-core/include/class_gosaSupportDaemon.inc index 28f77e33d..3b07b10c8 100644 --- a/gosa-core/include/class_gosaSupportDaemon.inc +++ b/gosa-core/include/class_gosaSupportDaemon.inc @@ -1376,7 +1376,7 @@ class gosaSupportDaemon (Uses the GOsa support daemon instead of the ldap database.) @return Array The policy settings for the given policy name. */ - public function krb5_get_policy($name) + public function krb5_get_policy($server,$name) { $res = array(); @@ -1387,6 +1387,13 @@ class gosaSupportDaemon return($ret); } + /* Check if the given server is a valid mac address + */ + if(!tests::is_mac($server)){ + trigger_error("The given server address '".$server."' is invalid, it must be a valid mac address"); + return($ret); + } + /* Prepare request event */ $xml_msg = @@ -1394,10 +1401,19 @@ class gosaSupportDaemon "
gosa_krb5_get_policy
". "".$name."". "GOSA". - "GOSA". + "".$server."". ""; - return($this->_send($xml_msg,TRUE)); + $tmp = $this->_send($xml_msg,TRUE); + if(isset($tmp['XML'])){ + $attrs = array("MASK","POLICY_REFCNT","PW_HISTORY_NUM","PW_MAX_LIFE","PW_MIN_CLASSES","PW_MIN_LENGTH","PW_MIN_LIFE"); + foreach($attrs as $attr){ + if(isset($tmp['XML'][$attr])){ + $ret[$attr] = $tmp['XML'][$attr]; + } + } + } + return($ret); } -- 2.30.2