[PKG-Openstack-devel] Bug#826453: Creating the temporary my.cfg file when password contains symbols fails connect
Turbo Fredriksson
turbo at bayour.com
Sun Jun 5 16:35:41 UTC 2016
Package: barbican-common
Version: 1:2.0.0-5
Severity: normal
The /var/lib/dpkg/info/barbican-common.config file contains the
following snippet:
----- s n i p -----
MYSQL_P_TMP=`mktemp -t OpenStack-mysql-statement.XXXXXXXXXX`
MYSQL_Q_TMP=`mktemp -t OpenStack-mysql-statement.XXXXXXXXXX`
echo "[client]
password=${MYSQL_DBPASS}" >${MYSQL_P_TMP}
echo ${MYSQL_QUERY} >${MYSQL_Q_TMP}
if [ -n "${MYSQL_DBPORT}" ] ; then
MY_PORT="--port=${MYSQL_DBPORT}"
fi
mysql --defaults-file=${MYSQL_P_TMP} -h${MYSQL_DBHOST} ${MY_PORT} -u${MYSQL_DBUSER} -D${MYSQL_DBNAME} < ${MYSQL_Q_TMP}
rm -f ${MYSQL_Q_TMP} ${MYSQL_P_TMP}
----- s n i p -----
When MYSQL_DBPASS contain symbols (such as *, /, < etc),
the connect will fail.
Solution is to put the password in citation marks:
----- s n i p -----
password='${MYSQL_DBPASS}'" >${MYSQL_P_TMP}
----- s n i p -----
PS. This problem exists in all Openstack packages.
-- System Information:
Debian Release: stretch/sid
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.16.0-4-amd64 (SMP w/16 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages barbican-common depends on:
ii adduser 3.114
ii dbconfig-common 2.0.4
ii debconf [debconf-2.0] 1.5.59
ii python-barbican 1:2.0.0-5
ii python-pysqlite2 2.7.0-1
pn python:any <none>
barbican-common recommends no packages.
barbican-common suggests no packages.
-- debconf information excluded
More information about the Openstack-devel
mailing list