File CVE-2019-10203.patch of Package pdns

Based on,

commit 1953ba21c91a8569250f72a3de0efe57eabd7482
Author: Peter van Dijk <peter.van.dijk@powerdns.com>
Date:   Wed Jul 17 21:06:01 2019 +0200

    use BIGINT for notified_serial in pg schema; fixes #6815

index f91046250..2333cf453 100644
Index: pdns-4.1.8/modules/gpgsqlbackend/3.4.0_to_4.1.0_schema.pgsql.sql
===================================================================
--- pdns-4.1.8.orig/modules/gpgsqlbackend/3.4.0_to_4.1.0_schema.pgsql.sql
+++ pdns-4.1.8/modules/gpgsqlbackend/3.4.0_to_4.1.0_schema.pgsql.sql
@@ -1 +1,2 @@
 ALTER TABLE records ALTER id TYPE BIGINT;
+ALTER TABLE domains ALTER notified_serial TYPE bigint USING CASE WHEN notified_serial >= 0 THEN notified_serial::bigint END;
Index: pdns-4.1.8/modules/gpgsqlbackend/schema.pgsql.sql
===================================================================
--- pdns-4.1.8.orig/modules/gpgsqlbackend/schema.pgsql.sql
+++ pdns-4.1.8/modules/gpgsqlbackend/schema.pgsql.sql
@@ -4,7 +4,7 @@ CREATE TABLE domains (
   master                VARCHAR(128) DEFAULT NULL,
   last_check            INT DEFAULT NULL,
   type                  VARCHAR(6) NOT NULL,
-  notified_serial       INT DEFAULT NULL,
+  notified_serial       BIGINT DEFAULT NULL,
   account               VARCHAR(40) DEFAULT NULL,
   CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT)))
 );
openSUSE Build Service is sponsored by