diff --git a/lam/HISTORY b/lam/HISTORY index 01afa08c..7c850a78 100644 --- a/lam/HISTORY +++ b/lam/HISTORY @@ -4,6 +4,7 @@ -> automatic UID/GID assignment did not fully work -> PDF: additional groups for Unix users -> inetOrgPerson: fixed mobile number + -> Samba 2/3: passwords fixed for file uploads 28.09.2005 0.5.0 diff --git a/lam/lib/modules/sambaAccount.inc b/lam/lib/modules/sambaAccount.inc index 2cddfcbd..b85ea54e 100644 --- a/lam/lib/modules/sambaAccount.inc +++ b/lam/lib/modules/sambaAccount.inc @@ -887,13 +887,13 @@ class sambaAccount extends baseModule { } // use Unix password if ($rawAccounts[$i][$ids['sambaAccount_pwdUnix']] == "") { // default: use Unix - $partialAccounts[$i]['lmPassword'] = lmPassword($partialAccounts[$i]['userPassword']); - $partialAccounts[$i]['ntPassword'] = ntPassword($partialAccounts[$i]['userPassword']); + $partialAccounts[$i]['lmPassword'] = lmPassword($rawAccounts[$i][$ids['posixAccount_password']]); + $partialAccounts[$i]['ntPassword'] = ntPassword($rawAccounts[$i][$ids['posixAccount_password']]); } elseif (in_array($rawAccounts[$i][$ids['sambaAccount_pwdUnix']], array('true', 'false'))) { if ($rawAccounts[$i][$ids['sambaAccount_pwdUnix']] == 'true') { // use Unix - $partialAccounts[$i]['lmPassword'] = lmPassword($partialAccounts[$i]['userPassword']); - $partialAccounts[$i]['ntPassword'] = ntPassword($partialAccounts[$i]['userPassword']); + $partialAccounts[$i]['lmPassword'] = lmPassword($rawAccounts[$i][$ids['posixAccount_password']]); + $partialAccounts[$i]['ntPassword'] = ntPassword($rawAccounts[$i][$ids['posixAccount_password']]); } else { // use given password $partialAccounts[$i]['lmPassword'] = lmPassword($rawAccounts[$i][$ids['sambaAccount_password']]); diff --git a/lam/lib/modules/sambaSamAccount.inc b/lam/lib/modules/sambaSamAccount.inc index 215f00f7..b4f920d9 100644 --- a/lam/lib/modules/sambaSamAccount.inc +++ b/lam/lib/modules/sambaSamAccount.inc @@ -1259,13 +1259,13 @@ class sambaSamAccount extends baseModule { } // use Unix password if ($rawAccounts[$i][$ids['sambaSamAccount_pwdUnix']] == "") { // default: use Unix - $partialAccounts[$i]['sambaLMPassword'] = lmPassword($partialAccounts[$i]['userPassword']); - $partialAccounts[$i]['sambaNTPassword'] = ntPassword($partialAccounts[$i]['userPassword']); + $partialAccounts[$i]['sambaLMPassword'] = lmPassword($rawAccounts[$i][$ids['posixAccount_password']]); + $partialAccounts[$i]['sambaNTPassword'] = ntPassword($rawAccounts[$i][$ids['posixAccount_password']]); } elseif (in_array($rawAccounts[$i][$ids['sambaSamAccount_pwdUnix']], array('true', 'false'))) { if ($rawAccounts[$i][$ids['sambaSamAccount_pwdUnix']] == 'true') { // use Unix - $partialAccounts[$i]['sambaLMPassword'] = lmPassword($partialAccounts[$i]['userPassword']); - $partialAccounts[$i]['sambaNTPassword'] = ntPassword($partialAccounts[$i]['userPassword']); + $partialAccounts[$i]['sambaLMPassword'] = lmPassword($rawAccounts[$i][$ids['posixAccount_password']]); + $partialAccounts[$i]['sambaNTPassword'] = ntPassword($rawAccounts[$i][$ids['posixAccount_password']]); } else { // use given password $partialAccounts[$i]['sambaLMPassword'] = lmPassword($rawAccounts[$i][$ids['sambaSamAccount_password']]);