* Sat May 18 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-8.sme
- edit LDAP entries using Net::LDAP rather than cpu [SME: 12687]
This commit is contained in:
@@ -143,7 +143,7 @@ if ($event eq 'ibay-create')
|
||||
foreach my $grp ( 'shared', $ibay->prop("Group") ) {
|
||||
$result = $ldap->modify("cn=$grp,ou=Groups,$base",
|
||||
add => {
|
||||
"memberUid"=> [ $ibay->prop("Uid")]
|
||||
"memberUid" => [ $ibayName ]
|
||||
});
|
||||
# error code 20 is entry already exits.
|
||||
$result->code && ( $result->code != 20 ) && ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed to add (ldap) account $ibayName to supplementary group $grp.\n" );
|
||||
@@ -200,11 +200,11 @@ elsif ($event eq 'ibay-modify' and $ibayName ne 'Primary')
|
||||
#------------------------------------------------------------
|
||||
# Loop to add new user to groups "shared,". $ibay->prop("Group")
|
||||
#------------------------------------------------------------
|
||||
foreach my $grp ( 'shared', $ibay->prop("Group") ) {
|
||||
foreach my $grp ( 'shared', $ibay->prop("Group") ) {
|
||||
$result = $ldap->modify("cn=$grp,ou=Groups,$base",
|
||||
add=> {
|
||||
"memberUid"=> [ $ibay->prop("Uid")]
|
||||
} );
|
||||
add => {
|
||||
"memberUid" => [ $ibayName ]
|
||||
});
|
||||
# error code 20 is entry already exits.
|
||||
$result->code && ( $result->code != 20 ) && ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed to add (ldap) account $ibayName to supplementary group $grp.\n" );
|
||||
}
|
||||
|
Reference in New Issue
Block a user