File: bug-224326-eval-mysqlfix.patch

package info (click to toggle)
wwwconfig-common 0.3.0
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 488 kB
  • sloc: sh: 952; makefile: 5
file content (50 lines) | stat: -rw-r--r-- 2,733 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
diff -urN wwwconfig-common-0.0.32~/mysql-dropdb.sh wwwconfig-common-0.0.32/mysql-dropdb.sh
--- wwwconfig-common-0.0.32~/mysql-dropdb.sh	2003-08-31 13:30:26.000000000 +0200
+++ wwwconfig-common-0.0.32/mysql-dropdb.sh	2003-12-18 00:38:32.000000000 +0100
@@ -39,8 +39,8 @@
 else
     if eval $mysqlcmd -f -e "\"show databases;\"" | grep -e "^$dbname" > /dev/null 2>&1 ; then
 	log="${log}Droping database $dbname."
-	if $mysqlcmd -f -e "DROP DATABASE $dbname;" ; then
-	    if $mysqlcmd -f -e "show databases;" | grep -e "^$dbname" > /dev/null 2>&1 ; then
+	if eval $mysqlcmd -f -e "\"DROP DATABASE $dbname;\"" ; then
+	    if eval $mysqlcmd -f -e "\"show databases;\"" | grep -e "^$dbname" > /dev/null 2>&1 ; then
 		error="Database $dbname NOT successfully droped. You have to do it manually."
 	    else
 		status=drop
diff -urN wwwconfig-common-0.0.32~/mysql-dropuser.sh wwwconfig-common-0.0.32/mysql-dropuser.sh
--- wwwconfig-common-0.0.32~/mysql-dropuser.sh	2003-08-31 13:30:26.000000000 +0200
+++ wwwconfig-common-0.0.32/mysql-dropuser.sh	2003-12-18 00:38:52.000000000 +0100
@@ -42,7 +42,7 @@
 	use: dpkg-reconfigure -plow packagename to reconfigure."
 else
     log="${log}Droping database user $dbuser."
-    if $mysqlcmd -f mysql -e "select User from user;" | grep $dbuser >/dev/null 2>&1 ; then
+    if eval $mysqlcmd -f mysql -e "\"select User from user;\"" | grep $dbuser >/dev/null 2>&1 ; then
 	if eval $mysqlcmd -f mysql -e "\"
 	CONNECT mysql;
 	
diff -urN wwwconfig-common-0.0.32~/mysql-if-exec.sh wwwconfig-common-0.0.32/mysql-if-exec.sh
--- wwwconfig-common-0.0.32~/mysql-if-exec.sh	2003-08-31 13:30:26.000000000 +0200
+++ wwwconfig-common-0.0.32/mysql-if-exec.sh	2003-12-18 00:35:27.000000000 +0100
@@ -49,7 +49,7 @@
 	use: dpkg-reconfigure -plow packagename to reconfigure."
 elif eval $mysqlcmd -f $dbname -e "\"$statement\"" >/dev/null 2>&1 ; then
     log="${log}Executing command to mysql."
-    if $mysqlcmd -f $dbname < $sqlfile > /dev/null 2>&1 ; then
+    if eval $mysqlcmd -f $dbname < $sqlfile > /dev/null 2>&1 ; then
 	status=exec
     else
 	status=execerror
diff -urN wwwconfig-common-0.0.32~/mysql-ifnot-exec.sh wwwconfig-common-0.0.32/mysql-ifnot-exec.sh
--- wwwconfig-common-0.0.32~/mysql-ifnot-exec.sh	2003-08-31 13:30:26.000000000 +0200
+++ wwwconfig-common-0.0.32/mysql-ifnot-exec.sh	2003-12-18 00:35:27.000000000 +0100
@@ -48,7 +48,7 @@
 	use: dpkg-reconfigure -plow packagename to reconfigure."
 elif ! eval $mysqlcmd -f $dbname -e "\"$statement\"" >/dev/null 2>&1 ; then
     log="${log}Executing command to mysql."
-    if $mysqlcmd -f $dbname < $sqlfile > /dev/null 2>&1 ; then
+    if eval $mysqlcmd -f $dbname < $sqlfile > /dev/null 2>&1 ; then
 	status=exec
     else
 	status=execerror