- Fix client input validation vulnerability
- Fix my.cnf search path
This commit is contained in:
parent
a0bc190df2
commit
c7d5687bb9
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=221400
15 changed files with 145 additions and 10 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME?= mysql
|
||||
PORTVERSION= 5.0.67
|
||||
PORTREVISION?= 0
|
||||
PORTREVISION?= 1
|
||||
CATEGORIES= databases
|
||||
MASTER_SITES= ${MASTER_SITE_MYSQL}
|
||||
MASTER_SITE_SUBDIR= MySQL-5.0
|
||||
|
|
27
databases/mysql50-server/files/patch-client_mysql.cc
Normal file
27
databases/mysql50-server/files/patch-client_mysql.cc
Normal file
|
@ -0,0 +1,27 @@
|
|||
--- client/mysql.cc.orig 2007-11-13 13:29:42 +0000
|
||||
+++ client/mysql.cc 2008-05-01 19:16:09 +0000
|
||||
@@ -2636,9 +2636,12 @@
|
||||
{
|
||||
while((field = mysql_fetch_field(result)))
|
||||
{
|
||||
- tee_fprintf(PAGER, "<TH>%s</TH>", (field->name ?
|
||||
- (field->name[0] ? field->name :
|
||||
- " ") : "NULL"));
|
||||
+ tee_fputs("<TH>", PAGER);
|
||||
+ if (field->name && field->name[0])
|
||||
+ xmlencode_print(field->name, field->name_length);
|
||||
+ else
|
||||
+ tee_fputs(field->name ? " " : "NULL", PAGER);
|
||||
+ tee_fputs("</TH>", PAGER);
|
||||
}
|
||||
(void) tee_fputs("</TR>", PAGER);
|
||||
}
|
||||
@@ -2651,7 +2654,7 @@
|
||||
for (uint i=0; i < mysql_num_fields(result); i++)
|
||||
{
|
||||
(void) tee_fputs("<TD>", PAGER);
|
||||
- safe_put_field(cur[i],lengths[i]);
|
||||
+ xmlencode_print(cur[i], lengths[i]);
|
||||
(void) tee_fputs("</TD>", PAGER);
|
||||
}
|
||||
(void) tee_fputs("</TR>", PAGER);
|
|
@ -15,7 +15,7 @@
|
|||
if (DEFAULT_SYSCONFDIR != "")
|
||||
+ {
|
||||
errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
|
||||
+ errors += add_directory(alloc, DEFAULT_SYSCONFDIR "mysql", dirs);
|
||||
+ errors += add_directory(alloc, DEFAULT_SYSCONFDIR "/mysql", dirs);
|
||||
+ }
|
||||
#endif /* __EMX__ || __OS2__ */
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME?= mysql
|
||||
PORTVERSION= 5.1.28
|
||||
PORTREVISION?= 0
|
||||
PORTREVISION?= 1
|
||||
CATEGORIES= databases
|
||||
MASTER_SITES= ${MASTER_SITE_MYSQL}
|
||||
MASTER_SITE_SUBDIR= MySQL-5.1
|
||||
|
|
27
databases/mysql51-server/files/patch-client_mysql.cc
Normal file
27
databases/mysql51-server/files/patch-client_mysql.cc
Normal file
|
@ -0,0 +1,27 @@
|
|||
--- client/mysql.cc.orig 2007-11-13 13:29:42 +0000
|
||||
+++ client/mysql.cc 2008-05-01 19:16:09 +0000
|
||||
@@ -2636,9 +2636,12 @@
|
||||
{
|
||||
while((field = mysql_fetch_field(result)))
|
||||
{
|
||||
- tee_fprintf(PAGER, "<TH>%s</TH>", (field->name ?
|
||||
- (field->name[0] ? field->name :
|
||||
- " ") : "NULL"));
|
||||
+ tee_fputs("<TH>", PAGER);
|
||||
+ if (field->name && field->name[0])
|
||||
+ xmlencode_print(field->name, field->name_length);
|
||||
+ else
|
||||
+ tee_fputs(field->name ? " " : "NULL", PAGER);
|
||||
+ tee_fputs("</TH>", PAGER);
|
||||
}
|
||||
(void) tee_fputs("</TR>", PAGER);
|
||||
}
|
||||
@@ -2651,7 +2654,7 @@
|
||||
for (uint i=0; i < mysql_num_fields(result); i++)
|
||||
{
|
||||
(void) tee_fputs("<TD>", PAGER);
|
||||
- safe_put_field(cur[i],lengths[i]);
|
||||
+ xmlencode_print(cur[i], lengths[i]);
|
||||
(void) tee_fputs("</TD>", PAGER);
|
||||
}
|
||||
(void) tee_fputs("</TR>", PAGER);
|
|
@ -15,7 +15,7 @@
|
|||
if (DEFAULT_SYSCONFDIR != "")
|
||||
+ {
|
||||
errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
|
||||
+ errors += add_directory(alloc, DEFAULT_SYSCONFDIR "mysql", dirs);
|
||||
+ errors += add_directory(alloc, DEFAULT_SYSCONFDIR "/mysql", dirs);
|
||||
+ }
|
||||
#endif /* DEFAULT_SYSCONFDIR */
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME?= mysql
|
||||
PORTVERSION= 5.1.28
|
||||
PORTREVISION?= 0
|
||||
PORTREVISION?= 1
|
||||
CATEGORIES= databases
|
||||
MASTER_SITES= ${MASTER_SITE_MYSQL}
|
||||
MASTER_SITE_SUBDIR= MySQL-5.1
|
||||
|
|
27
databases/mysql54-server/files/patch-client_mysql.cc
Normal file
27
databases/mysql54-server/files/patch-client_mysql.cc
Normal file
|
@ -0,0 +1,27 @@
|
|||
--- client/mysql.cc.orig 2007-11-13 13:29:42 +0000
|
||||
+++ client/mysql.cc 2008-05-01 19:16:09 +0000
|
||||
@@ -2636,9 +2636,12 @@
|
||||
{
|
||||
while((field = mysql_fetch_field(result)))
|
||||
{
|
||||
- tee_fprintf(PAGER, "<TH>%s</TH>", (field->name ?
|
||||
- (field->name[0] ? field->name :
|
||||
- " ") : "NULL"));
|
||||
+ tee_fputs("<TH>", PAGER);
|
||||
+ if (field->name && field->name[0])
|
||||
+ xmlencode_print(field->name, field->name_length);
|
||||
+ else
|
||||
+ tee_fputs(field->name ? " " : "NULL", PAGER);
|
||||
+ tee_fputs("</TH>", PAGER);
|
||||
}
|
||||
(void) tee_fputs("</TR>", PAGER);
|
||||
}
|
||||
@@ -2651,7 +2654,7 @@
|
||||
for (uint i=0; i < mysql_num_fields(result); i++)
|
||||
{
|
||||
(void) tee_fputs("<TD>", PAGER);
|
||||
- safe_put_field(cur[i],lengths[i]);
|
||||
+ xmlencode_print(cur[i], lengths[i]);
|
||||
(void) tee_fputs("</TD>", PAGER);
|
||||
}
|
||||
(void) tee_fputs("</TR>", PAGER);
|
|
@ -15,7 +15,7 @@
|
|||
if (DEFAULT_SYSCONFDIR != "")
|
||||
+ {
|
||||
errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
|
||||
+ errors += add_directory(alloc, DEFAULT_SYSCONFDIR "mysql", dirs);
|
||||
+ errors += add_directory(alloc, DEFAULT_SYSCONFDIR "/mysql", dirs);
|
||||
+ }
|
||||
#endif /* DEFAULT_SYSCONFDIR */
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME?= mysql
|
||||
PORTVERSION= 5.1.28
|
||||
PORTREVISION?= 0
|
||||
PORTREVISION?= 1
|
||||
CATEGORIES= databases
|
||||
MASTER_SITES= ${MASTER_SITE_MYSQL}
|
||||
MASTER_SITE_SUBDIR= MySQL-5.1
|
||||
|
|
27
databases/mysql55-server/files/patch-client_mysql.cc
Normal file
27
databases/mysql55-server/files/patch-client_mysql.cc
Normal file
|
@ -0,0 +1,27 @@
|
|||
--- client/mysql.cc.orig 2007-11-13 13:29:42 +0000
|
||||
+++ client/mysql.cc 2008-05-01 19:16:09 +0000
|
||||
@@ -2636,9 +2636,12 @@
|
||||
{
|
||||
while((field = mysql_fetch_field(result)))
|
||||
{
|
||||
- tee_fprintf(PAGER, "<TH>%s</TH>", (field->name ?
|
||||
- (field->name[0] ? field->name :
|
||||
- " ") : "NULL"));
|
||||
+ tee_fputs("<TH>", PAGER);
|
||||
+ if (field->name && field->name[0])
|
||||
+ xmlencode_print(field->name, field->name_length);
|
||||
+ else
|
||||
+ tee_fputs(field->name ? " " : "NULL", PAGER);
|
||||
+ tee_fputs("</TH>", PAGER);
|
||||
}
|
||||
(void) tee_fputs("</TR>", PAGER);
|
||||
}
|
||||
@@ -2651,7 +2654,7 @@
|
||||
for (uint i=0; i < mysql_num_fields(result); i++)
|
||||
{
|
||||
(void) tee_fputs("<TD>", PAGER);
|
||||
- safe_put_field(cur[i],lengths[i]);
|
||||
+ xmlencode_print(cur[i], lengths[i]);
|
||||
(void) tee_fputs("</TD>", PAGER);
|
||||
}
|
||||
(void) tee_fputs("</TR>", PAGER);
|
|
@ -15,7 +15,7 @@
|
|||
if (DEFAULT_SYSCONFDIR != "")
|
||||
+ {
|
||||
errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
|
||||
+ errors += add_directory(alloc, DEFAULT_SYSCONFDIR "mysql", dirs);
|
||||
+ errors += add_directory(alloc, DEFAULT_SYSCONFDIR "/mysql", dirs);
|
||||
+ }
|
||||
#endif /* DEFAULT_SYSCONFDIR */
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME?= mysql
|
||||
PORTVERSION= 5.1.28
|
||||
PORTREVISION?= 0
|
||||
PORTREVISION?= 1
|
||||
CATEGORIES= databases
|
||||
MASTER_SITES= ${MASTER_SITE_MYSQL}
|
||||
MASTER_SITE_SUBDIR= MySQL-5.1
|
||||
|
|
27
databases/percona55-server/files/patch-client_mysql.cc
Normal file
27
databases/percona55-server/files/patch-client_mysql.cc
Normal file
|
@ -0,0 +1,27 @@
|
|||
--- client/mysql.cc.orig 2007-11-13 13:29:42 +0000
|
||||
+++ client/mysql.cc 2008-05-01 19:16:09 +0000
|
||||
@@ -2636,9 +2636,12 @@
|
||||
{
|
||||
while((field = mysql_fetch_field(result)))
|
||||
{
|
||||
- tee_fprintf(PAGER, "<TH>%s</TH>", (field->name ?
|
||||
- (field->name[0] ? field->name :
|
||||
- " ") : "NULL"));
|
||||
+ tee_fputs("<TH>", PAGER);
|
||||
+ if (field->name && field->name[0])
|
||||
+ xmlencode_print(field->name, field->name_length);
|
||||
+ else
|
||||
+ tee_fputs(field->name ? " " : "NULL", PAGER);
|
||||
+ tee_fputs("</TH>", PAGER);
|
||||
}
|
||||
(void) tee_fputs("</TR>", PAGER);
|
||||
}
|
||||
@@ -2651,7 +2654,7 @@
|
||||
for (uint i=0; i < mysql_num_fields(result); i++)
|
||||
{
|
||||
(void) tee_fputs("<TD>", PAGER);
|
||||
- safe_put_field(cur[i],lengths[i]);
|
||||
+ xmlencode_print(cur[i], lengths[i]);
|
||||
(void) tee_fputs("</TD>", PAGER);
|
||||
}
|
||||
(void) tee_fputs("</TR>", PAGER);
|
|
@ -15,7 +15,7 @@
|
|||
if (DEFAULT_SYSCONFDIR != "")
|
||||
+ {
|
||||
errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
|
||||
+ errors += add_directory(alloc, DEFAULT_SYSCONFDIR "mysql", dirs);
|
||||
+ errors += add_directory(alloc, DEFAULT_SYSCONFDIR "/mysql", dirs);
|
||||
+ }
|
||||
#endif /* DEFAULT_SYSCONFDIR */
|
||||
|
||||
|
|
Loading…
Reference in a new issue