[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gallery-devel
Subject:    Re: [Gallery-devel] Drop database permission checks in installer?
From:       Bharat Mediratta <bharat () menalto ! com>
Date:       2009-01-20 20:58:44
Message-ID: 49763B04.30108 () menalto ! com
[Download RAW message or body]

Andy Staudacher wrote:
> The current installer's checks for MySQL permissions only work for
> certain setups. E.g. the most basic dev setup is probably using MySQL's
> root user to connect G3 to MySQL, and that won't work.
> 
> The reason is that the schema_privileges doesn't contain all information
> we need. Neither does the user or the host or db tables (ignoring the
> tables_priv and columns_priv tables). We'd need to check at least db,
> host and user tables and deal with MySQL's wildcards as well (e.g.
> ''@'%' in schema_privileges.grantee).
> 
> These are the options:
> 1) Scan all necessary MySQL tables and deal with wildcards to derive a
> full picture of the user's actual privileges.
> 2) Use G2's approach: Probing permission X by running a query which
> requires permission X.
> 3) Add an exception for root, assuming that most other cases will work
> with what we've got.
> 4) Drop the MySQL permission checks, just let it bomb.
> 5) Use a MySQL function which can answer the question: "Does user X have
> permission Y on database Z". But to my knowledge such a function doesn't
> exist.

In the current installer I opted for #4 above.  If it bombs, it bombs
and we can sort it out at that point.

-Bharat

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
__[ g a l l e r y - d e v e l ]_________________________

[ list info/archive --> http://gallery.sf.net/lists.php ]
[ gallery info/FAQ/download --> http://gallery.sf.net ]
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic