Fix for CVE-2007-2691

This commit is contained in:
adrianp 2007-06-14 21:27:41 +00:00
parent 74ac1e5065
commit 4e08b8d0a9
3 changed files with 17 additions and 2 deletions

View file

@ -1,7 +1,8 @@
# $NetBSD: Makefile,v 1.32 2006/10/22 09:32:53 rillig Exp $
# $NetBSD: Makefile,v 1.33 2007/06/14 21:27:41 adrianp Exp $
PKGNAME= ${DISTNAME:S/-/-server-/}
SVR4_PKGNAME= mysqs
PKGREVISION= 1
COMMENT= MySQL 4, a free SQL database (server)
CONFLICTS= {mysql-server-[0-9]*,mysql3-server-[0-9]*}

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.27 2007/05/23 08:11:50 martti Exp $
$NetBSD: distinfo,v 1.28 2007/06/14 21:27:41 adrianp Exp $
SHA1 (mysql-4.1.22.tar.gz) = 857e942cc3207caf56e2aa48961fc1ed66d932e6
RMD160 (mysql-4.1.22.tar.gz) = bfcf5058e4247cf4d7d1550ea54c64ebc8bc615e
@ -19,3 +19,4 @@ SHA1 (patch-ax) = c73f0d59c9e079abc8fc16965297257cb8f8a592
SHA1 (patch-bd) = 6eb42818196f0a981e7d85fa5791030483a037c4
SHA1 (patch-be) = 9cb9e8fe550e168a67cd90d0fd7fc6cc9d4029d5
SHA1 (patch-bf) = 1bbcdd13fa662e2b17114b8b390d16cebccf389c
SHA1 (patch-bg) = e388cbafcc2d6eff1df881984442f34bdb7c07f6

View file

@ -0,0 +1,13 @@
$NetBSD: patch-bg,v 1.1 2007/06/14 21:27:42 adrianp Exp $
--- sql/sql_parse.cc.orig 2006-11-03 02:17:00.000000000 +0000
+++ sql/sql_parse.cc
@@ -2736,7 +2736,7 @@ unsent_create_error:
old_list=table[0];
new_list=table->next[0];
old_list.next=new_list.next=0;
- if (check_grant(thd, ALTER_ACL, &old_list, 0, UINT_MAX, 0) ||
+ if (check_grant(thd, ALTER_ACL | DROP_ACL, &old_list, 0, UINT_MAX, 0) ||
(!test_all_bits(table->next->grant.privilege,
INSERT_ACL | CREATE_ACL) &&
check_grant(thd, INSERT_ACL | CREATE_ACL, &new_list, 0,