Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Request Tracker: Commit

rt branch, 3.8-trunk, updated. rt-3.8.6-93-g68425c3

 

 

Request Tracker commit RSS feed   Index | Next | Previous | View Threaded


falcone at bestpractical

Nov 19, 2009, 9:11 AM

Post #1 of 1 (306 views)
Permalink
rt branch, 3.8-trunk, updated. rt-3.8.6-93-g68425c3

The branch, 3.8-trunk has been updated
via 68425c35ff842f8ef0d31d5db8480f42012747c8 (commit)
from 06bb6f547b1c7c804b6e8f09482ad6af6e402887 (commit)

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

- Log -----------------------------------------------------------------
commit 68425c35ff842f8ef0d31d5db8480f42012747c8
Author: Dominic Hargreaves <dom [at] earth>
Date: Thu Nov 19 11:36:45 2009 -0500

Fix Postgres ACL script to work with usernames that need quoting
(inspired by patch to RTFM)

diff --git a/etc/acl.Pg b/etc/acl.Pg
index a139b50..8a0d4f2 100755
--- a/etc/acl.Pg
+++ b/etc/acl.Pg
@@ -54,7 +54,7 @@ sub acl {
# if there's already an rt_user, use it.
my @row = $dbh->selectrow_array( "SELECT usename FROM pg_user WHERE usename = '$db_user'" );
unless ( $row[0] ) {
- push @acls, "CREATE USER $db_user WITH PASSWORD '$db_pass' NOCREATEDB NOCREATEUSER;";
+ push @acls, "CREATE USER \"$db_user\" WITH PASSWORD '$db_pass' NOCREATEDB NOCREATEUSER;";
}

my $sequence_right
@@ -64,10 +64,10 @@ sub acl {
foreach my $table (@tables) {
if ( $table =~ /^[a-z]/ && $table ne 'sessions' ) {
# table like objectcustomfields_id_s
- push @acls, "GRANT $sequence_right ON $table TO $db_user;"
+ push @acls, "GRANT $sequence_right ON $table TO \"$db_user\";"
}
else {
- push @acls, "GRANT SELECT, INSERT, UPDATE, DELETE ON $table TO $db_user;"
+ push @acls, "GRANT SELECT, INSERT, UPDATE, DELETE ON $table TO \"$db_user\";"
}
}
return (@acls);

-----------------------------------------------------------------------
_______________________________________________
Rt-commit mailing list
Rt-commit [at] lists
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-commit

Request Tracker commit RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.