Re: [Freeipa-devel] [PATCH 0231] Fix record parsing to prevent child zone corruption

2014-04-09 Thread Tomas Hozza
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 04/01/2014 08:29 PM, Petr Spacek wrote:
 Hello,
 
 Fix record parsing to prevent child zone corruption.
 
 Child zone hosted on the same server as parent zone was
 corrupted by bug in update_record().
 Child zone's apex was modified by update_records()
 instead of delegation records in the parent zone.
 
 https://fedorahosted.org/bind-dyndb-ldap/ticket/134
 

ACK

Solves the problem described in the ticket.

Regards,

Tomas Hozza
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTRP7XAAoJEMWIetUdnzwt6sMH/1OABEPs2+4nat6gKn849dTR
ZrfrBiAu6nKMyzAGNfEGMpoqUxm94OrvdGXdqVhu0zUAT7NLTlvnlDziCqTggVnI
vG7BENtMR4XMCDp+6o0cS8YsQoipUw4RGGA9eMvqD73tTUPGJf1XEMrTd0QQ5HJy
XpsbGNMeMH+tzrTn65rM2zTCYZDDyO/adbejWyn3/JUfTpSLWicAldyUW1FECYtN
vH2miG4vjwr+4ivZxvGNds0GskM3GZBxPHz6dWXkrrI2mKtR3kFgaOTKNtlNwfBC
tCXYnlDuBDwEYe1kRekiG4gYhjjLq9dq8DgTTqO5W/J1Bz3eNjlJ3i3fh6o6s7g=
=nrmr
-END PGP SIGNATURE-

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH 0231] Fix record parsing to prevent child zone corruption

2014-04-09 Thread Petr Spacek

On 9.4.2014 10:03, Tomas Hozza wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 04/01/2014 08:29 PM, Petr Spacek wrote:

Hello,

Fix record parsing to prevent child zone corruption.

Child zone hosted on the same server as parent zone was
corrupted by bug in update_record().
Child zone's apex was modified by update_records()
instead of delegation records in the parent zone.

https://fedorahosted.org/bind-dyndb-ldap/ticket/134



ACK

Solves the problem described in the ticket.


Pushed to master: 5fe2ca4bb88376849996fc40fe9eecf6af09417e

--
Petr^2 Spacek

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


[Freeipa-devel] [PATCH 0231] Fix record parsing to prevent child zone corruption

2014-04-01 Thread Petr Spacek

Hello,

Fix record parsing to prevent child zone corruption.

Child zone hosted on the same server as parent zone was
corrupted by bug in update_record().
Child zone's apex was modified by update_records()
instead of delegation records in the parent zone.

https://fedorahosted.org/bind-dyndb-ldap/ticket/134

--
Petr^2 Spacek
From 644d8e4d66107bd081dd0023f5b44d1c176861be Mon Sep 17 00:00:00 2001
From: Petr Spacek pspa...@redhat.com
Date: Tue, 1 Apr 2014 18:38:35 +0200
Subject: [PATCH] Fix record parsing to prevent child zone corruption.

Child zone hosted on the same server as parent zone was
corrupted by bug in update_record().
Child zone's apex was modified by update_records()
intead of delegation records in the parent zone.

https://fedorahosted.org/bind-dyndb-ldap/ticket/134

Signed-off-by: Petr Spacek pspa...@redhat.com
---
 NEWS  | 6 ++
 src/ldap_helper.c | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index d997df58dca5b77d84c0fafa2757cf49e15f7d65..e787e7f2d73e3e99d3d5c0d03b9ea92dff75b510 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,9 @@
+4.2
+
+[1] Record parsing was fixed to prevent child-zone data corruption in cases
+where parent zone example.com was hosted on the same server as child zone
+sub.example.com. (This bug was introduced in version 4.0.)
+
 4.1
 
 [1] Fix few minor bugs in error handling found by static code analyzers.
diff --git a/src/ldap_helper.c b/src/ldap_helper.c
index 05951fccbc655aef20177ea4a905159141665800..678e9f8a52181a5c63c96d29da9b3e5ec3b1273d 100644
--- a/src/ldap_helper.c
+++ b/src/ldap_helper.c
@@ -4030,7 +4030,7 @@ update_restart:
 	ldapdb = NULL;
 	journal = NULL;
 	ldapdb_rdatalist_destroy(mctx, rdatalist);
-	CHECK(zr_get_zone_dbs(inst-zone_register, name, ldapdb, rbtdb));
+	CHECK(zr_get_zone_dbs(inst-zone_register, origin, ldapdb, rbtdb));
 	CHECK(dns_db_newversion(ldapdb, version));
 
 	CHECK(dns_db_findnode(rbtdb, name, ISC_TRUE, node));
-- 
1.9.0

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel