SF Bug #3004012 - password sync for sambaSamAccount template broken.
This commit is contained in:
parent
9e9960bc3d
commit
d5c8d42adc
@ -83,7 +83,10 @@ class AttributeFactory {
|
|||||||
if (isset($values['type']))
|
if (isset($values['type']))
|
||||||
switch ($values['type']) {
|
switch ($values['type']) {
|
||||||
case 'password':
|
case 'password':
|
||||||
return $this->newPasswordAttribute($name,$values,$server_id,$source);
|
if (! strcasecmp($name,'sambaLMPassword') || ! strcasecmp($name,'sambaNTPassword'))
|
||||||
|
return $this->newSambaPasswordAttribute($name,$values,$server_id,$source);
|
||||||
|
else
|
||||||
|
return $this->newPasswordAttribute($name,$values,$server_id,$source);
|
||||||
|
|
||||||
case 'multiselect':
|
case 'multiselect':
|
||||||
case 'select':
|
case 'select':
|
||||||
|
@ -189,7 +189,10 @@ class PageRender extends Visitor {
|
|||||||
$blank++;
|
$blank++;
|
||||||
}
|
}
|
||||||
|
|
||||||
} elseif (count($attribute2->getValues()) !=1) {
|
} elseif (count($attribute2->getValues()) == 0) {
|
||||||
|
return;
|
||||||
|
|
||||||
|
} elseif (count($attribute2->getValues()) != 1) {
|
||||||
array_push($values,'');
|
array_push($values,'');
|
||||||
$blank++;
|
$blank++;
|
||||||
|
|
||||||
@ -231,6 +234,9 @@ class PageRender extends Visitor {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! $attribute->hasBeenModified())
|
||||||
|
return;
|
||||||
|
|
||||||
# Get the attribute.
|
# Get the attribute.
|
||||||
if (preg_match_all('/%(\w+)(\|.+)?(\/[lU])?%/U',strtolower($args[1]),$matchall)) {
|
if (preg_match_all('/%(\w+)(\|.+)?(\/[lU])?%/U',strtolower($args[1]),$matchall)) {
|
||||||
if (count($matchall[1]) != 1)
|
if (count($matchall[1]) != 1)
|
||||||
@ -272,7 +278,7 @@ class PageRender extends Visitor {
|
|||||||
|
|
||||||
case 'nt':
|
case 'nt':
|
||||||
$sambapassword = new smbHash;
|
$sambapassword = new smbHash;
|
||||||
$vals[$i] = $sambapassword->nthash($passwordvalue); break;
|
$vals[$i] = $sambapassword->nthash($passwordvalue);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user