[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#984671: unblock: dbconfig-common/2.0.19



Package: release.debian.org
User: release.debian.org@packages.debian.org
Usertags: unblock
Severity: normal

Please unblock package dbconfig-common

[ Reason ]
Changes in dbconfig-common made during the bullseye release cycle
introduced a regression handling database names containing hyphens,
which made dbconfig-common fail in postinst when creating a database
user for a database containing a hyphen.

Escape the database name again to reestablish old behaviour.

[ Impact ]
Users that install packages that use dbconfig-common to handle the
database processing can see installation failures if databases are
involved that contain a hyphen.

[ Tests ]
dbconfig-common comes with an extensive test suite that's also run as
autopkgtest. I ran it manually and it passes, after I updated the
references to accommodate for the change.

[ Risks ]
The risk is small as the exact same quoting is present in buster too.

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

[ Other info ]
https://salsa.debian.org/debian/dbconfig-common/-/merge_requests/6

unblock dbconfig-common/2.0.19

Paul
diff -Nru dbconfig-common-2.0.18/debian/changelog dbconfig-common-2.0.19/debian/changelog
--- dbconfig-common-2.0.18/debian/changelog	2021-01-29 21:34:31.000000000 +0100
+++ dbconfig-common-2.0.19/debian/changelog	2021-03-06 20:56:28.000000000 +0100
@@ -1,3 +1,10 @@
+dbconfig-common (2.0.19) unstable; urgency=medium
+
+  [ Simon Hollenbach ]
+  * Fix mysql grant for db names containing hyphens
+
+ -- Paul Gevers <elbrus@debian.org>  Sat, 06 Mar 2021 20:56:28 +0100
+
 dbconfig-common (2.0.18) unstable; urgency=medium
 
   [ Chris Halls ]
diff -Nru dbconfig-common-2.0.18/internal/mysql dbconfig-common-2.0.19/internal/mysql
--- dbconfig-common-2.0.18/internal/mysql	2021-01-29 21:34:31.000000000 +0100
+++ dbconfig-common-2.0.19/internal/mysql	2021-03-06 20:56:28.000000000 +0100
@@ -326,7 +326,7 @@
         fi
         cat << EOF >> "$l_sqlfile"
 ALTER USER '$dbc_dbuser'@'$dbc_dballow' IDENTIFIED BY '$(dbc_mysql_escape_str "$dbc_dbpass")';
-GRANT ALL PRIVILEGES ON $dbc_dbname.* TO '$dbc_dbuser'@'$dbc_dballow';
+GRANT ALL PRIVILEGES ON \`$dbc_dbname\`.* TO '$dbc_dbuser'@'$dbc_dballow';
 FLUSH PRIVILEGES;
 EOF
         l_dbname=$dbc_dbname
diff -Nru dbconfig-common-2.0.18/test/data/dbc_mysql_createuser.nohost.sql.txt dbconfig-common-2.0.19/test/data/dbc_mysql_createuser.nohost.sql.txt
--- dbconfig-common-2.0.18/test/data/dbc_mysql_createuser.nohost.sql.txt	2021-01-29 21:34:31.000000000 +0100
+++ dbconfig-common-2.0.19/test/data/dbc_mysql_createuser.nohost.sql.txt	2021-03-06 20:56:28.000000000 +0100
@@ -1,4 +1,4 @@
 CREATE USER IF NOT EXISTS 'testdbuser'@'localhost';
 ALTER USER 'testdbuser'@'localhost' IDENTIFIED BY 'testdbpass';
-GRANT ALL PRIVILEGES ON testdbname.* TO 'testdbuser'@'localhost';
+GRANT ALL PRIVILEGES ON `testdbname`.* TO 'testdbuser'@'localhost';
 FLUSH PRIVILEGES;
diff -Nru dbconfig-common-2.0.18/test/data/dbc_mysql_createuser.remote.sql.txt dbconfig-common-2.0.19/test/data/dbc_mysql_createuser.remote.sql.txt
--- dbconfig-common-2.0.18/test/data/dbc_mysql_createuser.remote.sql.txt	2021-01-29 21:34:31.000000000 +0100
+++ dbconfig-common-2.0.19/test/data/dbc_mysql_createuser.remote.sql.txt	2021-03-06 20:56:28.000000000 +0100
@@ -1,4 +1,4 @@
 CREATE USER IF NOT EXISTS 'testdbuser'@'host2';
 ALTER USER 'testdbuser'@'host2' IDENTIFIED BY 'testdbpass';
-GRANT ALL PRIVILEGES ON testdbname.* TO 'testdbuser'@'host2';
+GRANT ALL PRIVILEGES ON `testdbname`.* TO 'testdbuser'@'host2';
 FLUSH PRIVILEGES;

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


Reply to: