[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.8-224-ge69d1ae

Alex Vandiver alexmv at bestpractical.com
Mon Dec 6 17:17:28 EST 2010


The branch, 3.8-trunk has been updated
       via  e69d1ae186e209ba67f770be0aef9025638433be (commit)
       via  3415cf7d7d4c81786fcd89d27418250fa799e609 (commit)
      from  0944cddc8607f73cb3df6715131b7c3e80419cdc (commit)

Summary of changes:
 etc/acl.mysql |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit 3415cf7d7d4c81786fcd89d27418250fa799e609
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Tue Aug 31 17:29:55 2010 -0400

    For MySQL, stop dropping privileges when we grant our own ACLs
    
    This also means that the DBA user no longer needs to have connect
    rights to the 'mysql' database.

diff --git a/etc/acl.mysql b/etc/acl.mysql
index 0982ca2..8d1d07e 100755
--- a/etc/acl.mysql
+++ b/etc/acl.mysql
@@ -14,9 +14,6 @@ sub acl {
     }
     print "Granting access to $db_user\@'$db_rthost' on $db_name.\n";
     return (
-        "USE mysql;",
-        "DELETE FROM user WHERE user = '$db_user';",
-        "DELETE FROM db where db = '$db_name';",
         "GRANT SELECT,INSERT,CREATE,INDEX,UPDATE,DELETE
                ON $db_name.*
                TO '$db_user'\@'$db_rthost'

commit e69d1ae186e209ba67f770be0aef9025638433be
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Tue Aug 31 17:47:09 2010 -0400

    Escape database names passed to mysql's GRANT, for databases containing _ or %

diff --git a/etc/acl.mysql b/etc/acl.mysql
index 8d1d07e..1688237 100755
--- a/etc/acl.mysql
+++ b/etc/acl.mysql
@@ -13,9 +13,10 @@ sub acl {
         return;
     }
     print "Granting access to $db_user\@'$db_rthost' on $db_name.\n";
+    $db_name =~ s/([_%])/\\$1/g;
     return (
         "GRANT SELECT,INSERT,CREATE,INDEX,UPDATE,DELETE
-               ON $db_name.*
+               ON `$db_name`.*
                TO '$db_user'\@'$db_rthost'
                IDENTIFIED BY '$db_pass';",
     );

-----------------------------------------------------------------------


More information about the Rt-commit mailing list