fixed passwords on file upload

This commit is contained in:
Roland Gruber 2005-10-04 15:17:24 +00:00
parent 14f36b2be2
commit 2ad1394b20
3 changed files with 9 additions and 8 deletions

View File

@ -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

View File

@ -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']]);

View File

@ -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']]);