From: hickert Date: Wed, 21 Jul 2010 14:27:21 +0000 (+0000) Subject: Do not write samba hashes while there is no hook defined. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9c47f08eef96c0e366fbba4f4aa90329af9ee20c;p=gosa.git 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 --- 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();