From 9c47f08eef96c0e366fbba4f4aa90329af9ee20c Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 21 Jul 2010 14:27:21 +0000 Subject: [PATCH] Do not write samba hashes while there is no hook defined. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19043 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/functions.inc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index d2340c80d..7915adc15 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -3043,12 +3043,17 @@ function change_password ($dn, $password, $mode=0, $hash= "") // Not for groups if ($mode == 0){ - // Create SMB Password - $attrs= generate_smb_nt_hash($password); - if ($shadow != 0){ - $attrs['shadowLastChange']= $shadow; - } + $tmp = $config->get_cfg_value('core','sambaHashHook'); + if(!empty($tmp)){ + + // Create SMB Password + $attrs= generate_smb_nt_hash($password); + + if ($shadow != 0){ + $attrs['shadowLastChange']= $shadow; + } + } } $attrs['userPassword']= array(); -- 2.30.2