From 4764d0115e5360d3688d6ae629a17e4fc3bcd227 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 3 Dec 2010 14:23:06 +0000 Subject: [PATCH] Fixed locking of Samba hashes closes #1118 -Check was inverse. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20518 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/password-methods/class_password-methods.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gosa-core/include/password-methods/class_password-methods.inc b/gosa-core/include/password-methods/class_password-methods.inc index 4e5f38f83..2d7be6ffb 100644 --- a/gosa-core/include/password-methods/class_password-methods.inc +++ b/gosa-core/include/password-methods/class_password-methods.inc @@ -108,7 +108,7 @@ class passwordMethod $userPassword = preg_replace("/(^[^\}]+\})(.*$)/","\\1!\\2",$userPassword); // Only lock samba hashes if samba passwords are enabled - $smbPasswdEnabled = trim($config->get_cfg_value('core','sambaHashHook')) == ""; + $smbPasswdEnabled = trim($config->get_cfg_value('core','sambaHashHook')) != ""; if($smbPasswdEnabled){ $sambaLMPassword = preg_replace("/^[!]*(.*$)/","!\\1",$sambaLMPassword); $sambaNTPassword = preg_replace("/^[!]*(.*$)/","!\\1",$sambaNTPassword); @@ -187,7 +187,7 @@ class passwordMethod $userPassword = preg_replace("/(^[^\}]+\})!(.*$)/","\\1\\2",$userPassword); // Update samba hashes only if its enabled. - $smbPasswdEnabled = trim($config->get_cfg_value('core','sambaHashHook')) == ""; + $smbPasswdEnabled = trim($config->get_cfg_value('core','sambaHashHook')) != ""; if($smbPasswdEnabled){ $sambaLMPassword = preg_replace("/^[!]*(.*$)/","\\1",$sambaLMPassword); $sambaNTPassword = preg_replace("/^[!]*(.*$)/","\\1",$sambaNTPassword); -- 2.30.2