From: hickert Date: Fri, 28 May 2010 14:41:02 +0000 (+0000) Subject: Updated generate_smb_nt_hash to use rpc X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=26fe618ced0432db771cfee42359a8229c15b179;p=gosa.git Updated generate_smb_nt_hash to use rpc git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18793 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_config.inc b/gosa-core/include/class_config.inc index 0836bade5..bfa9ca327 100644 --- a/gosa-core/include/class_config.inc +++ b/gosa-core/include/class_config.inc @@ -302,7 +302,7 @@ class config { $passwd = $this->get_cfg_value('core','gosaRpcPassword'); $handle = new jsonRPC($server); - $handle->login($user, $password); + $handle->login($user, $passwd); //Fixme Add checks here - login successful aso. return($handle); diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index 5e53623da..53bdee5f7 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -3036,8 +3036,15 @@ function generate_smb_nt_hash($password) { global $config; - # Try to use gosa-si? - if ($config->get_cfg_value("core","gosaSupportURI") != ""){ + // First try to retrieve values via RPC + if ($config->get_cfg_value("core","gosaRpcServer") != ""){ + + $rpc = $config->getRpcHandle(); + $hash = $rpc->mksmbhash($password); + + }elseif ($config->get_cfg_value("core","gosaSupportURI") != ""){ + + // Try using gosa-si $res= gosaSupportDaemon::send("gosa_gen_smb_hash", "GOSA", array("password" => $password), TRUE); if (isset($res['XML']['HASH'])){ $hash= $res['XML']['HASH'];