Commit 99288c49 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Fixes #4634 Fixed migrate-dns for PTR records

Showing with 20 additions and 0 deletions
+20 -0
......@@ -1363,7 +1363,27 @@ sub migrate_dns {
$result->code && die "Migration of DNS zone subentry failed, LDAP error: ".$result->error."\n";
}
# Fix reverse zone PTR records DNs
$mesg = $ldap->search(
base => $zoneDn,
filter => "(&(objectClass=dNSZone)(!(relativeDomainName=@))(|(zoneName=*.arpa)(zoneName=*.arpa.)))"
);
$mesg->code && die $mesg->error;
@entries = $mesg->entries;
foreach my $entry (@entries) {
$entry->dn() =~ m/^([^,]+),(relativeDomainName=[^,]+),([^,]+,$zoneDn)$/ or next;
$result = $ldap->moddn (
$entry->dn(),
newrdn => $1,
deleteoldrdn => '1',
newsuperior => $2
);
$result->code && die "Migration of DNS reverse zone subentry ".$entry->dn()." failed, LDAP error: ".$result->error."\n";
}
# Add DNS tab on server
$mesg = $ldap->search(
base => $systemdn,
scope => 'base',
......
  • bmortier @bmortier

    mentioned in issue #1476

    By Côme Chilliet on 2017-09-02T15:27:31 (imported from GitLab)

    ·

    mentioned in issue #1476

    By Côme Chilliet on 2017-09-02T15:27:31 (imported from GitLab)

    Toggle commit list
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment