[PATCH] adjust gpgsql schema for advisory 2019-06
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Tue, 30 Jul 2019 13:40:09 +0000 (15:40 +0200)
committerChris Hofstaedtler <zeha@debian.org>
Mon, 12 Oct 2020 12:42:43 +0000 (13:42 +0100)
Gbp-Pq: Name CVE-2019-10203.patch

modules/gpgsqlbackend/4.1.10_to_4.1.11.schema.pgsql.sql [new file with mode: 0644]
modules/gpgsqlbackend/Makefile.am
modules/gpgsqlbackend/schema.pgsql.sql

diff --git a/modules/gpgsqlbackend/4.1.10_to_4.1.11.schema.pgsql.sql b/modules/gpgsqlbackend/4.1.10_to_4.1.11.schema.pgsql.sql
new file mode 100644 (file)
index 0000000..b0c2ee1
--- /dev/null
@@ -0,0 +1 @@
+ALTER TABLE domains ALTER notified_serial TYPE bigint USING CASE WHEN notified_serial >= 0 THEN notified_serial::bigint END;
index 8a820d516bbc0f828c85f372962628cd2673783e..9e2f271702e70bdcc41bbc733973f97f38043527 100644 (file)
@@ -12,6 +12,7 @@ dist_doc_DATA = \
        schema.pgsql.sql \
        nodnssec-3.x_to_3.4.0_schema.pgsql.sql \
        dnssec-3.x_to_3.4.0_schema.pgsql.sql \
+       4.1.10_to_4.1.11.schema.pgsql.sql \
        3.4.0_to_4.1.0_schema.pgsql.sql
 
 libgpgsqlbackend_la_SOURCES = \
index b105d879515488fe7f29c96f14f876abe7810e8b..cad35d5f194f0bb550a3355dbd1046ba2ae80a9d 100644 (file)
@@ -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)))
 );