Code

Fixed locking of Samba hashes closes #1118
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 3 Dec 2010 14:23:06 +0000 (14:23 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 3 Dec 2010 14:23:06 +0000 (14:23 +0000)
-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

index 4e5f38f83117bf2f41793fb0d4b9a721a28c1a46..2d7be6ffbf57e5d0710b1cf40dee8aeede4ffa49 100644 (file)
@@ -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);