summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c461774)
raw | patch | inline | side by side (parent: c461774)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 24 Apr 2008 12:08:32 +0000 (12:08 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 24 Apr 2008 12:08:32 +0000 (12:08 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10672 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_gosaSupportDaemon.inc | patch | blob | history |
diff --git a/gosa-core/include/class_gosaSupportDaemon.inc b/gosa-core/include/class_gosaSupportDaemon.inc
index 90cd2006093df0214117d0d7e8b259fc5a1cbb7f..e4772236c32bf787a90ecef02f241493a4e3ce7e 100644 (file)
{
$res = array();
+ /* 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 =
@pram String The name of the requested principal. (e.g. peter@EXAMPLE.DE)
@return Array A list containing the names of all configured principals.
*/
- public function krb5_get_principal($name)
+ public function krb5_get_principal($server,$name)
{
$ret = array();
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 =
@pram String The name of the principal to update. (e.g. peter@EXAMPLE.DE)
@return Boolean TRUE on success else FALSE.
*/
- public function krb5_set_principal($name,$values)
+ public function krb5_set_principal($server,$name,$values)
{
$ret = FALSE;
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);
+ }
+
$attrs = "";
foreach($values as $name => $value){
if(empty($name) || is_numeric($name)){
"<target>GOSA</target>".
"</xml>";
- return($this->_send($xml_msg,TRUE));
+ return($this->_send($xml_msg,TRUE) == TRUE && !$this->is_error());
}
@pram String The name of the principal. (e.g. peter@EXAMPLE.DE)
@return Boollean TRUE on success else FALSE
*/
- public function krb5_del_principal($name)
+ public function krb5_del_principal($server,$name)
{
$ret = FALSE;
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 =
"<source>GOSA</source>".
"<target>GOSA</target>".
"</xml>";
-
- return($this->_send($xml_msg,TRUE));
+ return($this->_send($xml_msg,TRUE) == TRUE && !$this->is_error());
}
{
$res = array();
+ /* 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 =
(Uses the GOsa support daemon instead of the ldap database.)
@return Boolean TRUE on success else FALSE
*/
- public function krb5_del_policy($name)
+ public function krb5_del_policy($server,$name)
{
$ret = FALSE;
+ /* 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);
+ }
+
/* Check if the given name is a valid request value
*/
if(!is_string($name) || empty($name)){