sub add_schema_update { my ($conn, $aentry, $err_ref) = @_; my $sentry = $conn->search($aentry->{dn}, "base", "(objectclass=*)", 0, ("*", "aci")); if (!$sentry) { $$err_ref .= "Error: trying to update entry that does not exist: " . $aentry->{dn} . "\n"; return 0; } my @addtypes = ("attributeTypes", "objectClasses"); foreach my $attr (@addtypes) { my @vals = $aentry->getValues($attr); my @values = ("dummyAttr: dummy value", @vals); # this dummy entry consumes the error 53 foreach my $val (@values) { $sentry->addValue( $attr, $val ); $conn->update($sentry); my $rc = $conn->getErrorCode(); if ( $rc != 0 ) { my $string = $conn->getErrorString(); $$err_ref .= "Error: updating entry " . $sentry->{dn} . " with value $val : $string\n"; } else { $$err_ref .= "Updated entry ". $sentry->{dn} . " with value $val : rc = $rc\n"; } } } return 1; }