From 7a90dd94e41ca1812e63761058e6e3e5bf54b867 Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 10 Sep 2008 09:43:53 +0000 Subject: [PATCH] Moved from external pwdhook to passwordHook git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12394 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/FAQ | 2 +- gosa-core/contrib/gosa.conf | 2 +- gosa-core/contrib/gosa.conf.5 | 4 ++-- gosa-core/html/password.php | 4 ++-- gosa-core/plugins/admin/users/class_userManagement.inc | 8 ++++---- gosa-core/plugins/personal/password/class_password.inc | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gosa-core/FAQ b/gosa-core/FAQ index dded880f2..fde2a3a8f 100644 --- a/gosa-core/FAQ +++ b/gosa-core/FAQ @@ -110,7 +110,7 @@ Q: I've to update passwords on external windows PDCs. Can I add a command to let synchronize these for me? A: There's the possibility to add a password hook in gosa.conf's main section using - the keyword "externalpwdhook". The specified command will be executed with + the keyword "passwordHook". The specified command will be executed with three parameters: /path/to/your/script username oldpassword newpassword So you can call i.e. smbpasswd to handle your password change on the PDC. diff --git a/gosa-core/contrib/gosa.conf b/gosa-core/contrib/gosa.conf index 2a2e5c916..528de0446 100644 --- a/gosa-core/contrib/gosa.conf +++ b/gosa-core/contrib/gosa.conf @@ -418,7 +418,7 @@ passwordMinDiffer="{$cv.pwd_rules.pwdiffer}" {/if} {if $cv.pwd_rules.externalpwdhook_active} - externalpwdhook="{$cv.pwd_rules.externalpwdhook}" + passwordHook="{$cv.pwd_rules.externalpwdhook}" {/if} {if $cv.errorlvl} displayerrors="true" diff --git a/gosa-core/contrib/gosa.conf.5 b/gosa-core/contrib/gosa.conf.5 index 7580154b8..4a8c496c7 100644 --- a/gosa-core/contrib/gosa.conf.5 +++ b/gosa-core/contrib/gosa.conf.5 @@ -554,11 +554,11 @@ statement determines whether a newly entered password has to be checked to have at least n different characters. .PP -.B externalpwdhook +.B passwordHook .I path .PP The -.I externalpwdhook +.I passwordHook can specify an external script to handle password settings at some other location besides the LDAP. It will be called this way: diff --git a/gosa-core/html/password.php b/gosa-core/html/password.php index 13f614b7d..0c395960e 100644 --- a/gosa-core/html/password.php +++ b/gosa-core/html/password.php @@ -238,8 +238,8 @@ if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['apply'])){ /* Passed quality check, just try to change the password now */ $output= ""; - if ($config->get_cfg_value("externalpwdhook") != ""){ - exec($config->get_cfg_value("externalpwdhook")." ".$ui->username." ". + if ($config->get_cfg_value("passwordHook") != ""){ + exec($config->get_cfg_value("passwordHook")." ".$ui->username." ". $_POST['current_password']." ".$_POST['new_password'], $resarr); if(count($resarr) > 0) { $output= join('\n', $resarr); diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc index 0ce9ca135..8114ef094 100644 --- a/gosa-core/plugins/admin/users/class_userManagement.inc +++ b/gosa-core/plugins/admin/users/class_userManagement.inc @@ -294,8 +294,8 @@ class userManagement extends plugin if(!change_password ($this->usertab->dn, $_POST['new_password'],0, $obj->pw_storage)){ return($smarty->fetch(get_template_path('password.tpl', TRUE))); } - if ($config->get_cfg_value("externalpwdhook") != ""){ - exec($config->get_cfg_value("externalpwdhook")." ".$username." ".$_POST['new_password'], $resarr); + if ($config->get_cfg_value("passwordHook") != ""){ + exec($config->get_cfg_value("passwordHook")." ".$username." ".$_POST['new_password'], $resarr); } new log("modify","users/".get_class($this),$this->usertab->dn,array(),"Password has been changed"); unset($this->usertab); @@ -305,8 +305,8 @@ class userManagement extends plugin if(!change_password ($this->dn, $_POST['new_password'])){ return($smarty->fetch(get_template_path('password.tpl', TRUE))); } - if ($config->get_cfg_value("externalpwdhook") != ""){ - exec($config->get_cfg_value("externalpwdhook")." ".$username." ".$_POST['new_password'], $resarr); + if ($config->get_cfg_value("passwordHook") != ""){ + exec($config->get_cfg_value("passwordHook")." ".$username." ".$_POST['new_password'], $resarr); } new log("modify","users/".get_class($this),$this->dn,array(),"Password has been changed"); } diff --git a/gosa-core/plugins/personal/password/class_password.inc b/gosa-core/plugins/personal/password/class_password.inc index ac4a43eeb..3470ed412 100644 --- a/gosa-core/plugins/personal/password/class_password.inc +++ b/gosa-core/plugins/personal/password/class_password.inc @@ -63,8 +63,8 @@ class password extends plugin $length = $this->config->get_cfg_value("passwordMinLength", 0); /* Call external password quality hook ?*/ - $check_hook = $this->config->get_cfg_value("externalpwdhook") != ""; - $hook = $this->config->get_cfg_value("externalpwdhook")." ".$ui->username." ".$_POST['current_password']." ".$_POST['new_password']; + $check_hook = $this->config->get_cfg_value("passwordHook") != ""; + $hook = $this->config->get_cfg_value("passwordHook")." ".$ui->username." ".$_POST['current_password']." ".$_POST['new_password']; if($check_hook){ exec($hook,$resarr); $check_hook_output = ""; -- 2.30.2